inject: Use a semaphore to prevent multiple runs of inject to interfere with each other.

Most users would never hit this, but it enables me to run apitrace tests
in parallel reliably.
d3dretrace: Cope with D3DLOCK_DONOTWAIT flag.

Same as commit 999284fd424cbf7dde024f949cdece0f308d41db, but now for
D3D9.
d3d9trace: Prototype capability clamping.

Really basic, and untested -- just to get the ball rolling.
common: Never include VersionHelpers.h.

Availability also depends on Windows SDK version, and it's not clear which.

We could have a include check, but might as well just use our replacement
for now.
cmake: Fix build with Visual Studio toolchain for XP.
d3dretrace: Added snapshot-interval functionality
cgltrace: Temporary workaround for SDL dlopening libGL.dylib directly.

Addresses the first problem reported in issue #278.
cli/diff-state: Get usage from jsondiff.py script.
cli: Exit early when script is not found.
cli/pickle: Pickle call flags as well.
unpickle: Support interrupting parsing.
cli/pickle: More efficient tuples.
cli/pickle: Pass across tuples/lists consistently.
cli/pickle: Pass structures as dictionaries.
cli/pickle: Treat pointers specially.
cli/pickle: Pass argument names.
d3dretrace: Enable locking more textures when dumping.
cmake: Fix whitespace.
d3dretrace: Centralize D3D9 format conversion.

And add fallback DXGI format conversion.
gltrace: Emit flag calls consistently.