Make old-style flag scoping conform to the new style rules.
Review Request #1147 - Created Oct. 9, 2014 and submitted
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.
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
ci is in flight.