Fix node_modules validation when building extensions.

Review Request #11608 — Created May 20, 2021 and submitted — Latest diff uploaded




When building extension packages against a production install of a
consuming application, it was likely that a build_pipeline_settings()
call in the app's would have path validation enabled,
looking for node_modules, and that the validation would fail.

In reality, we didn't care much about the presence of this path at this
stage, since the packaging process would be managing its own
node_modules. Rather than make the consuming app jump through hoops,
we now have a special environment variable that can be set to force
validation to be turned off. This mirrors the behavior of applications
using Djblets pre-2.0.

On top of this, we also explicitly define NODE_PATH to point to the
managed copy, ensuring it will be used instead of another, and avoiding
other lookup issues that could occur.

Tested building extensions against both a Review Board development server
and a production server.

Tested both initial builds (without a pre-populated node_modules directory)
and with a repeated build.