Switch global option registration to the new options system.

Also fix a couple of small issues that arose while testing this.

Also switch the --graph option in list_goals to be read from the
new location, to verify that this all works together.

Note that add_global_options is still used when generating the
build dictionary, so we can't get rid of it yet. We'll do so
in a pending change.

Testing Done:
Ran ci.sh. Ran manual command lines to verify that flags still work.

Reviewed at https://rbcommons.com/s/twitter/r/1109/
Sync of https://github.com/pantsbuild/pants/commit/65b46f6baf87478277e9df6937c5133c4d772a5f