retrace: Add optional parameter to allow looping N last frames
retrace: Consolidate loop parameters.

No looping, continous looping, and fixed number of loops, can all be
described with a single variable (0, <0, and >0) respectively.
d3dretrace: Move HRESULT message lookup code into its own function.

Instead of duplicating it on every generated function.
d3dretrace: Replace casts with templates.

Smaller generated code, same type checking guarantees.
d3dretrace: Check for pitch mismatch.

We should swizzle memcpies when pitches don't match.  But until we do,
at least warn about the issue.
dxgitrace: Try to detect non-overlapping buffer writes.

Work in progress.
dxgitrace: Shadow D3D11 buffers properly.
dxgitrace: Fill a pattern when discarding and shadowing.
dxgitrace: Ensure buffers are initialized.
dxgitrace: Use CRC32C hashes of 512byte blocks instead of memcopies.

Much faster.