Reverse order of `assert.equal` to read more easily.

The assert message for 'chai' is not as order-specific, so we can move
`g.opt*` first to make the asserts more readable.
Remove unnecessary code.

- The initializing to `undefined` is over-paranoid, since `getopt`
  always initializes all of those vars to `null` at the top of the
  function.
- `nextLoop` not used.
test/unit/util/getopt.js: Add standard license header.