getopt.js: simplify `nextchar` code.

Review URL: https://github.com/google/traceur-compiler/issues/292

Closes #292.