Add BuildArgs to store common build arguments . ### Description

This renames `ReplayArgs` in pywasmcross to `BuildArgs` and uses it in buildall and buildpkg. No functional changes are involved except for some modifications in function parameters and how logs are copied after the build.

This PR makes it easier to call methods in buildall and buildpkg from the new CLI.

### Checklists

- [x] Add / update tests

import base64
import pathlib

from pytest_pyodide import run_in_pyodide

DEMO_PATH = pathlib.Path(__file__).parent / "test_data"
SAMPLE_IMAGE = base64.b64encode(
    (DEMO_PATH / "tree-with-transparency.heic").read_bytes()
)


def test_heif(selenium):
    @run_in_pyodide(packages=["Pillow", "pillow_heif"])
    def _test_heif_inner(selenium, image_base64):
        import base64

        with open("tree-with-transparency.heic", "wb") as f:
            f.write(base64.b64decode(image_base64))

        import pillow_heif

        if pillow_heif.is_supported("tree-with-transparency.heic"):
            heif_file = pillow_heif.open_heif(
                "tree-with-transparency.heic", convert_hdr_to_8bit=False
            )
            assert heif_file.mode == "RGBA"
            assert len(heif_file.data) == 278784
            assert heif_file.stride == 1056

    _test_heif_inner(selenium, SAMPLE_IMAGE)


def test_pillow(selenium):
    @run_in_pyodide(packages=["Pillow", "pillow_heif"])
    def _test_pillow_inner(selenium, image_base64):
        import base64

        with open("tree-with-transparency.heic", "wb") as f:
            f.write(base64.b64decode(image_base64))

        from PIL import Image
        from pillow_heif import register_heif_opener

        register_heif_opener()

        im = Image.open("tree-with-transparency.heic")
        assert im.size == (262, 264)
        assert im.mode == "RGBA"

    _test_pillow_inner(selenium, SAMPLE_IMAGE)

import base64
import pathlib

from pytest_pyodide import run_in_pyodide

DEMO_PATH = pathlib.Path(__file__).parent / "test_data"
SAMPLE_IMAGE = base64.b64encode(
    (DEMO_PATH / "tree-with-transparency.heic").read_bytes()
)


def test_heif(selenium):
    @run_in_pyodide(packages=["Pillow", "pillow_heif"])
    def _test_heif_inner(selenium, image_base64):
        import base64

        with open("tree-with-transparency.heic", "wb") as f:
            f.write(base64.b64decode(image_base64))

        import pillow_heif

        if pillow_heif.is_supported("tree-with-transparency.heic"):
            heif_file = pillow_heif.open_heif(
                "tree-with-transparency.heic", convert_hdr_to_8bit=False
            )
            assert heif_file.mode == "RGBA"
            assert len(heif_file.data) == 278784
            assert heif_file.stride == 1056

    _test_heif_inner(selenium, SAMPLE_IMAGE)


def test_pillow(selenium):
    @run_in_pyodide(packages=["Pillow", "pillow_heif"])
    def _test_pillow_inner(selenium, image_base64):
        import base64

        with open("tree-with-transparency.heic", "wb") as f:
            f.write(base64.b64decode(image_base64))

        from PIL import Image
        from pillow_heif import register_heif_opener

        register_heif_opener()

        im = Image.open("tree-with-transparency.heic")
        assert im.size == (262, 264)
        assert im.mode == "RGBA"

    _test_pillow_inner(selenium, SAMPLE_IMAGE)
