Description
In the recent refactorings to get based on WebIDL bindings an optimization within wasm-bindgen-the-CLI was lost. In many cases we need a JS shim for imported functions, but in some cases we don't need any shim at all and can import the function directly. We should import the relevant function directly into the module if this is the case rather than creating a shim which simply forwards arguments.
It's worth noting as well that as wasm standards progress, we'll get more features for more types which makes this a more important optimization!
Additionally we should also apply a second optimization (which I don't think was ever done) which is to directly import the function from the wasm module if the imported path is a vanilla ES path, not requiring a JS shim for us to move, for example, a global JS type into a module's namespace.