worker: implement Web Locks API
This is based upon https://github.com/nodejs/node/pull/22719 and exposes the same API. Instead of a C++-backed approach, this variant implements the API mostly in JS.
Please feel free to push any changes that you think are reasonably uncontroversial to this branch yourself.
/cc @devsnek @benjamingr @nodejs/workers
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