Simplify command line and options processing.

Remove some special case flag processing and rely on commander.js more.
Move referrer option from System to options.js.
This is a bit of a mystery. I believe that the body of the Promise function argument in the CodeUnit constructor is not always being executed, so codeUnit.state is not defined. But the only way I can reproduce this is to run `make test/unit/node/generated-code-dependencies.js-run` which fails in a bizarre way.  The test runs fine when it is part of the suite.   Anyway that is just FYI, I've removed this change.