doc: add ESM examples in `module` API doc page
In an effort to promote ESM usage, add examples using this syntax alongside CJS ones. I've also added some links where it was missing.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
documentation is changed or added -
commit message follows commit guidelines