Add a switch to compile dotnet.js as ES6 module (#41964)
* Add a switch to compile dotnet.js as ES6 module
With `./build.sh -os Browser /p:WasmEnableES6=True`, we can now compile
`dotnet.js` as an ES6 module, which can be easily be loaded in
environments like Deno. e.g.:
```js
// myApp.js
import jsdom from "https://dev.jspm.io/jsdom";
window.document = new jsdom.JSDOM(null, {url:'http://localhost'}).window.document;
const dotnetModule = await import('./artifacts//bin/native/net5.0-Browser-Debug-wasm/dotnet.js');
// this is needed since we cannot pass scriptDirectory to upstream module (yet: https://github.com/emscripten-core/emscripten/pull/12120)
const bytes = Deno.readFileSync('./artifacts//bin/native/net5.0-Browser-Debug-wasm/dotnet.wasm', 'utf8');
const dotnet = await dotnetModule.default({wasmBinary: bytes}); // currently it calls run() on load
// dotnet.run(); // we can _additionally_ invoke run() on demand
```
Also waiting on Deno PR to merge with utf-16le suppot, workaround is:
```sh
$ ./build.sh -os Browser /p:WasmEnableES6=True
$ sed -i '' 's/utf-16le/utf8/' artifacts/bin/native/net5.0-Browser-Debug-wasm/dotnet.js
```
and then
```sh
$ deno run --allow-read myApp.js
```
* Set default value to False explicitly
* Use lower-case false for check
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>