[v10.x] lib: introduce internal/validators
Create a file to centralize argument validators that are used in multiple internal modules. Move validateInt32 and validateUint32 to this file.
This is a partial patch backport of https://github.com/nodejs/node/pull/19973. It is necessary to backport other subsequent PRs to the fs module.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines