Add check functions for optimized DCT implementations.

Checks are enabled by defining OD_CHECKASM.
doc: fix pdf generation
Use AC_TRY_LINK in tests for intrinics so that a missing intrinsics symbol is noticed.
Add AVX2 intrinsics detection to autotools
Revert Makefile.am changes from previous commit

avx2dct.c is part of a separate patch series, and should have not been included.
Fix AVX2 feature detection
Fix desync by properly clearing mv_grid in the decoder

The desync happens since dd3fca176f087d8fe72ddf2e972d728ef92d941f which
assumes that the grid is cleared. It was reproducable by encoding 16
frames of parkjoy_1080p at -v 50.
upload_commits.sh: Use the full commit message
Enable the SSE2 4x4 IDCT

This should have been enabled earlier but slipped through.
Using finer quantizer for keyframes

Metrics on video-1-short:
           RATE (%)  DSNR (dB)
    PSNR -0.20639  0.01102
 PSNRHVS -0.16628  0.01316
    SSIM -0.20454  0.00984
FASTSSIM -0.22283  0.01366
Adds optional code to measure the actual overhead of the entropy coder
DC RDO using the actual skip probabilities

video-1-short metrics:
           RATE (%)  DSNR (dB)
    PSNR -0.41900  0.02230
 PSNRHVS -0.47261  0.03719
    SSIM -0.54069  0.02580
FASTSSIM -0.34503  0.02112
Make it possible to encode robust streams with PVQ

Three changes:
1) theta is now encoded without assuming we know max_theta (most of the loss
   is from here)
2) Approximate sin(theta)=theta when computing K
3) Disable inter-band masking

Changes 1) and 2) only apply to P-frames, but 3) is even for key-frames to
avoid them looking different from P-frames.

Metrics on video-1-short:
           RATE (%)  DSNR (dB)
    PSNR 0.31829  -0.01388
 PSNRHVS 1.62467  -0.12656
    SSIM 0.86702  -0.03900
FASTSSIM 1.15187  -0.06973