lib: refactor some lib/internals
Some light refactoring of internals/*.js
- For linkedlist and freelist, this yields about a 5% perf improvement in general
- Consistent use of the module.exports = {} pattern, with module.exports = {} at the end.
(do not squash commits)
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
lib/internal