wasm: support wasi console redirect for the ghci browser mode
This commit adds optional support for redirecting wasi console stdout/stderr back to the host when running wasm ghci browser mode. By default, the wasi console outputs are only available under F12 devtools console, but in case of testing against a mobile browser, the devtools console may not be readily available, and it would be more convenient to at least get wasi console output on the host side. The redirection logic is simple, just adding another two WebSockets connections that pump the line-buffered textual messages back to host.
Loading