Fix issue with appendable options in new options system.

Reviewed at https://rbcommons.com/s/twitter/r/1131/
Read jvm compilation options the new way.

Also fix a bug where we weren't detecting legacy inverse boolean flags correctly.

Testing Done:
CI running. Manual use of relevant flags.

Reviewed at https://rbcommons.com/s/twitter/r/1129/
A unicode-safe wrapper around shlex.split().
Temporarily move nailgun flag registration to be global.

It was causing problems during option migration. This temporarily
widens an existing abstraction leak, but once we're fully over to
the new options system this naturally goes away.

Also - ensure task options are registered in proper scope order.

Testing Done:
ci is baking.

Reviewed at https://rbcommons.com/s/twitter/r/1140/
Fix a BUILD file bug.
Make old-style flag scoping conform to the new style rules.

Specifically, a singleton task in a goal must be fully qualified
by the goal name, unless the task has the same name as the goal.

E.g., --ivy-report becomes --resolve-ivy-report.

This only affects a small number of flags, and has to happen
sooner or later anyway.

Reviewed at https://rbcommons.com/s/twitter/r/1146/
Simpler implementation of flag prefix gathering.

The previous implementation detected "leaf scopes", to avoid matching
a prefix of a longer prefix. However this was more trouble than it
was worth, and the same effect can be achieved by simply sorting
the scopes.

Reviewed in https://rbcommons.com/s/twitter/r/1147/