Build and gyp fixes
This is a spin off from work I did for integrating V8 7.1 (https://github.com/nodejs/node/pull/22920), but this part works with master
to reduce cases of unneeded rebuild make && make
will do a lot of work twice.
This also fixes a few small bugs.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
documentation is changed or added -
commit message follows commit guidelines