[telemetry] Add command_line.ArgumentHandlerMixIn class.

The beginnings of a new way to handle command-line options. In the future, all classes that add command-line options must implement ArgumentHandlerMixIn.

Usage: Subclass ArgumentHandlerMixIn. In AddCommandLineArgs, set the command-line options. In ProcessCommandLineArgs, store them in private static class variables. The class can retrieve its own arguments at any time - yes, it's global state, but command-line arguments are always global state anyway, and it's contained within that class.

- Keeps declaration and usage of options close to each other, by encapsulating them in the same class.
- Enforces that all arguments must be available at parse time without depending on other arguments, by making all methods @classmethods.
- The ProcessCommandLineArgs() method gives Handlers a place to validate their command-line options before performing more expensive setup work.
- Removes the need to pass the options parameter around everywhere.
- Allows us to gradually break down Finder/BrowserOptions. Smooths the transition to argparse.


BUG=163294, 350833
TEST=Unit tests, ran cloud_storage, run_benchmark, run_measurement, and run_gpu_tests with a bunch of different argument types.

Review URL: https://codereview.chromium.org/187413003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257276 0039d316-1c4b-4281-b951-d872f2087c98
35 files changed