gh-146352: In Emscripten pyrepl test, pick port dynamically (#146375)

Dynamically allocates the port for the pyrepl browser test, so that multiple
tests can run at the same time. Also allows the pyrepl test to honor the
CROSS_BUILD_DIR environment variable.
7 files changed