buffer: refactor buffer exports
- Refactor buffer exports to use module.exports = {} pattern
-
Migrate most errors to use internal/errorsrefack: crossed off, as this was done in #13976
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
buffer