Upgrade emsdk version to v4.0.3 (#23633)
### Description
Upgrade EMSDK to v4.0.3
### File Size Comparison:
Baseline: e66650350b85cb5e3a408f6576fe6a7f4f4ddebc
[[Build]](https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=1613209)
This change: bb9f747d633fa72ea95f7ad69d7fb684f2d5944d
[[Build]](https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=1613180)
|File | Baseline | This Change | Diff |
|--|--|---|---|
| ort-wasm-simd-threaded.jsep.mjs | 49,240 | 44,230 | -5,010 |
| ort-wasm-simd-threaded.jsep.wasm | 22,921,505 | 21,236,866 |
-1,684,639 |
| ort-wasm-simd-threaded.mjs | 25,539 | 20,890 | -4,649 |
| ort-wasm-simd-threaded.wasm | 11,771,161 | 10,942,193 | -828,968 |
| ort.min.mjs | 345,608 | 345,608 | 0 |
| ort.bundle.min.mjs | 392,960 | 388,426 | -4,534 |
### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
- EMSDK 3.1.62-3.1.74 is not working because of an linker issue
(wasm-ld) that causes out-of-memory or crash.
- EMSDK > 3.1.69 requires a change as a post-process of the generated JS
file otherwise it will fails onnxruntime-web (as a NPM package) to be
consumed in user's web application because of an unexpected webpack
behavior.
- EMSDK >= 4.0.1 fixes the out-of-memory issue but brought new issues
causes build break of an indirect dependency of ORT (ORT ->
ORT-extensions -> dlib).
- EMSDK 4.0.3 introduces a change that allows a previous workaround to
be removed.
In this PR, all of the above issues are addressed:
- the linker issue (wasm-ld) is fixed in 4.0.1+
- the post-process is added in `onnxruntime_webassembly.cmake` as a
`POST_BUILD` event of target `onnxruntime_webassembly`. It's done by a
Node.js script that uses Regex match and replace.
- `dlib` not working with EMSDK v4:
- the issue is tracked at https://github.com/davisking/dlib/issues/3045
- Currently no active user is using ORT extension. In this PR, removed
ORT extension from the build.
- file `gen_struct_info.py` is moved from
`${DAWN_EMSCRIPTEN_TOOLCHAIN}/tools/maint` to
`${DAWN_EMSCRIPTEN_TOOLCHAIN}/tools`. This helped to remove the
patch.tgz for emscripten. This change also requires a change in Dawn, so
patched the change needed for Dawn in this PR.