Add expansion functions to options parser

This provides a way to programmatically define expansions of options based on what other options are defined for the parser. In particular, it will be used for the --incompatible_* changes mechanism, to turn on all incompatible change flags.

Expansion functions are specified in the @Option annotation, similar to converters. They are computed when an OptionsParser is constructed, and inspect a preliminary version of its OptionsData to determine the expansion result. This is then cached in the final OptionsData used by the parser.

Expansion information for usage strings is available, but only when the usage strings are obtained via the parser.

--
PiperOrigin-RevId: 150817553
MOS_MIGRATED_REVID=150817553

GitOrigin-RevId: 22d261c21748fba31797f0de8bd98fb2ff2fd2f5
Change-Id: Iec0d628fbf873b2b3d7fb7f4c86ad809f9955dbb
7 files changed
tree: 1e4e9dbef87e3e263f3cadd09a590520e23a8e81
  1. java/