glretrace: Use getopt rather than manual parsing of command-line options
glretrace: Use getopt rather than manual parsing of command-line options

This allows for better consistency with other apitrace command-line
interface. It also provids for several new full-name options where
previously only a single-letter option was available,
(--snapshot-prefix for -s, --verbose for -v, et.).

We use getopt_long_only here to maintain compatibility with the older
style of long options with one dash (-core) as well as providing the
double-dash version )--core).

It would now be quite convenient to regularize the command-line
interface to glretrace in several ways. None of these are performed in
this commit to avoid breaking compatibility with existing scripts,
etc.:

  * Give multi-letter, abbreviated options (--pcpu, etc.) proper
    long-form names (--profile-cpu).

  * Combine related options under a single name (--pcpu and --pgpu
    could be something like --profile=cpu,gpu).

  * Combine options with the same meaning that would never be used
    independently. Snapshot generation and snapshot comparison are
    different modes. Meanwhile, prefix selection and call selection
    should apply identically to either mode. So both modes can use a
    single set of options (--prefix and --calls) rather than having
    separate --snapshot-prefix and --snapshot options.

surround-io/apitrace,trtt/apitrace,EoD/apitrace,surround-io/apitrace,EoD/apitrace,schulmar/apitrace,trtt/apitrace,schulmar/apitrace,tuanthng/apitrace,trtt/apitrace,swq0553/apitrace,joshua5201/apitrace,EoD/apitrace,swq0553/apitrace,trtt/apitrace,tuanthng/apitrace,swq0553/apitrace,surround-io/apitrace,swq0553/apitrace,PeterLValve/apitrace,apitrace/apitrace,schulmar/apitrace,EoD/apitrace,surround-io/apitrace,joshua5201/apitrace,trtt/apitrace,joshua5201/apitrace,apitrace/apitrace,schulmar/apitrace,EoD/apitrace,tuanthng/apitrace,swq0553/apitrace,apitrace/apitrace,apitrace/apitrace,surround-io/apitrace,joshua5201/apitrace,PeterLValve/apitrace,joshua5201/apitrace,PeterLValve/apitrace,tuanthng/apitrace,schulmar/apitrace,PeterLValve/apitrace,tuanthng/apitrace