Split off from #4876.
What this PR does is basically fixing incorrect shared library dependencies.
For instance, `cryptography` package depends on `openssl`, so the python
extension should link to `libssl.so`.
However, before this PR, it was not linked correctly.
```sh
$ pyodide auditwheel show cryptography-42.0.5-cp312-cp312-pyodide_2024_0_wasm32.whl
{'cryptography\\hazmat\\bindings\\_rust.cpython-312-wasm32-emscripten.so': []}
```
After this PR, it is linked correctly.
```bash
$ pyodide auditwheel show cryptography-42.0.5-cp312-cp312-pyodide_2024_0_wasm32.whl
{
│ 'cryptography\\hazmat\\bindings\\_rust.cpython-312-wasm32-emscripten.so': [
│ │ 'libssl.so',
│ │ 'libcrypto.so'
│ ]
}
```
__Why do we need this change?__
Because it is how shared libraries should work.
__Why was this working before?__
Because we loaded dependencies globally. `openssl` is loaded globally, so its
symbols were visible to `cryptography` even if they are not linked. However,
#4876 will change all library loading mechanism to local, so all shared
libraries should now have correct dependencies to work.