src: add kNoBrowserGlobals flag for Environment
This is the runtime equivalent of the configure --no-browser-globals
build flag.
A runtime flag is needed because embedders can have multiple modes that, Node.js may both run in a browser environment, and in an independent environment that has no browser globals. For example, Node.js script running in web page spawning a script with child_process.fork
.
This PR also moves the creation of browser globals into a separate script, so it can be controlled with C++ flag without affecting bootstrapping in snapshot.
/cc @nodejs/embedders @joyeecheung @addaleax