[v10.x-backport] module: use compileFunction over Module.wrap
This backports PR https://github.com/nodejs/node/pull/21573, which replaces the CJS wrapper with the use of compileFunction.
The major benefit of this is that it will allow us to use native v8 coverage support in the 10.x branch.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines