simpleperf: add function to preprocess options.

Add Command::PreprocessOptions() to extracts options from the
argument list. It splits options into different types. Instead of
replying on the order in the argument list, it allows a command
choosing the order to process each option.

Also put whole command.h in simpleperf namespace.

Bug: 160701181
Test: run simpleperf_unit_test.
Change-Id: I9b20e21a94797c322c1371cbe1704b3e2ce1be28
25 files changed