[wasm] Trim down size of dotnet.wasm (#39549)
* [interp] Use constant for concurrent collection in progress
Saves 4k on wasm.
* [sgen] Use constant for concurrent sweep
Saves 0.5k on wasm
* [sgen] Remove code from threadpool when not using concurrent mode
Saves 2.5k on wasm
* [sgen] Avoid keeping some callbacks alive
Saves 0.5k on wasm
* [sgen] Avoid registering callback if not used
* [sgen] Add option to remove binary protocol from build
Saves 5k on wasm
* [sgen] Add option to disable togglerefs
Saves 1k on wasm
* [sgen] We never need to wait for sweep if serial
Saves 0.5k on wasm
* [sgen] Disable also canaries if debug helpers are disabled
Saves 1k on wasm
* [sgen] Disable also pinning_stats if debug features are disabled
Saves 2k on wasm
* [sgen] Disable also gchandle stats if debug is disabled
Saves 1k on wasm
* [sgen] Disable also sgen logging if debugging is disabled
Saves 6k on wasm
* [runtime] Disable log messages if assert messages is disabled
This is mainly beneficial do to very common calls of g_error.
Saves 35k on wasm
18 files changed: