worker: improve integration with native addons
Native addons are now unloaded if all Environments referring to it have been cleaned up, except if it also loaded by the main Environment.
/cc @gabrielschulhof Who I remember had some suggestions for improving upon this approach
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines