trim --prune: Look at FLAG_NO_SIDE_EFFECTS rather than FLAG_VERBOSE

The --prune option is documented precisely to prune calls with no side
effects, so that's the flag it should examine.

Previously, the trim --prune code was keying off of the VERBOSE
flag. This hasn't made a substantial difference in the past, (the
NO_SIDE_EFFECTS calls have historically all been VERBOSE as well). But
NO_SIDE_EFFECTS has the advantage that it can objectively determined,
so the set of calls that should have this flag should be
unambiguous. (Meanwhile, whether any particular call should be
classified as VERBOSE is inherently subjective.)
trim: Don't consider a SwapBuffers call has having no side effects

I can't justify why I ever added this code. I can only guess that I was
trying to get qapitrace to not show frame markers for frames that had
largely been trimmed.

Anyway, the code is wrong. SwapBuffers call obviously have significant
side effects. And the effect I was trying to achieve is already well
satisified by the change in 2f0d1a3244c8953a4468759ac466b80c4965d38f
that will trim a SwapBuffers call when --trim-spec=drawing is in
force.
trim: Greatly expand the list of calls considered to have no side effects

The list of calls added here with the NO_SIDE_EFFECTS flag was
obtained from the existing specs/glapi.py file, (most[*] calls with
"sideeffects=False").

It's a bit unfortunate that we have this duplication of information in
the source tree, (two different lists of calls with no side
effects). But that duplication was already present before this
commit. This commit merely brings this list into sync with the other.

[*] The following calls are not added here in spite of having
sideeffects=False in glapi.py:

    glGetTextureImageEXT
    glGetnCompressedTexImageARB
    glGetnColorTableARB

José reports that the above calls can have side effects when PBOs are
on, (and he plans to update glapi.py).

Then, while the following calls may not affect traditional "GL state"
they do have side effects that can be observed by the user. And these
are debugging side effects that can be very important when
replaying/analyzing a trace. For example, debug message or string
markers are used to decorate different portions of the graphics
command stream with user-supplied data that exists nowhere else. So
these calls are not considered as having no side effects:

    glDebugMessageControl
    glDebugMessageControlARB
    glDebugMessageEnableAMD
    glDebugMessageInsert
    glDebugMessageInsertAMD
    glDebugMessageInsertARB
    glPopDebugGroup
    glPushDebugGroup
    glStringMarkerGREMEDY
trim: Fix early-bailout bug when accepting both --calls and --frames

The trim code was inappropriately bailing once either list was
exhausted, before also exhausting the user's other requested list.

This fixes the traces/trim-frames-and-calls test recently added to the
apitrace-tests repository.

Thanks to Eric Anholt for reporting this bug.
Fix sorting of callFlagTable

Commit 89681160639 inserted three entries in an unsorted position in
the list, tripping up an internal check and causing many apitrace
operations to abort. Fix this by restoring correct sorting.
trim: Add --no-deps, --no-prune, and --exact options.

These allow for explicitly specifying the behavior desired. This
change anticipates some future change of the default trimming from
--exact to --auto. (That is, with these options in place, scripts can
be written today with either --exact or --auto and be immune to any
future change of the default.)
trim: Enable dependency analysis (--auto) by default.

The --exact mode of trimming can be useful, but only if the user has
somehow performed all the dependency analysis needed manually, (such
as by extracting a list of calls from a previous run by
--print-callset). Since --exact inherently requires more care to be
used, it makes sense to also require an extra command-line option, and
to thus prefer the easier-to-use --auto mode by default.
gltrace,glretrace: A few more tweaks to (no) side-effects flags.
gltrace: Handle negative lengths in glDebugMessageInsert* (issue 119).
gltrace: Respect all string length parameters.
gltrace: Better handling of GetPerfMonitorCounterInfoAMD
gltrace,glretrace: Better support for indirect draws from user memory.

Not really tested, though should be no worse than current situation.
glstate: Dump a few more parameters.
Gix MSVC build.
d3dretrace: Dump UINT formats too.
d3dretrace: Remove debug Sleep.
tracediff: Improve diff argument help message.
retracediff: Avoid WindowsError 5 Access is denied, when exiting.
snapdiff: Zoom in small images.

Often used in tests.
Add Android.mk to aid integration with FirefoxOS

This Android.mk is part of "Bug 831147 - Integrate apitrace into build"
https://bugzilla.mozilla.org/831147
With this addition, when apitrace sources are cloned into
B2GROOT/external/apitrace, then the FirefoxOS build system picks
up automatically apitrace, compiles and installs it to the right place.