add types for `__next_app__` module loading functions (#74566)
`__next_app__.require` and `__next_app__.loadChunk` were typed as `any` for no good reason. i made them more strict + adjusted callsites as needed.
also contains a drive-by fix for `wrapClientComponentLoader` -- it was using a `try ... finally` without awaiting, so it wasn't measuring anything (because `loadChunk`, being async, would always return immediately)