Make lambda used for motion estimation RD adaptive.

Previously this was a hard-coded constant (chosen just to get
 something working).
This uses the "theoretically optimal" value (with a cap), which may
 not actually be very good, especially since the rate model we use
 in mcenc.c is highly inaccurate and we don't consider during the
 motion search whether or not PVQ's noref flags will throw away our
 prediction.
Fixes intra pred bug introduced in d6ebba54b

DC was assumed zero even when Haar was off.
Changes intra mode encoding to adapt the entire table instead of p0

When resnabling intra, fixing the mode encoding gives (on subset1):
           RATE (%) DSNR (dB)
    PSNR -1.93514 0.126041
 PSNRHVS -2.41487 0.186607
    SSIM -1.98817 0.105181
FASTSSIM -2.69753 0.101027
Rate-adaptive lambda for intra mode selection

Subset1 improvement (when re-enabling intra) is:
           RATE (%) DSNR (dB)
    PSNR -2.99314 0.175805
 PSNRHVS -3.54018 0.226506
    SSIM -1.95321 0.0837564
FASTSSIM -7.19934 0.216148
Fixes for issues 351 and 352
rd_collect.sh: follow symlinks to find samples
encoder_example: Add --limit to set the maximum number of frames to encode
Fix support for monochrome input
tools: Use progressive scan for yuvjpeg
Fix Haar multiresolution blending.

The blending weights were being setup incorrectly for blocks with
 unsplit edges (it was not properly accounting for the fact that the
 low-pass band is half the size of the block).
Simplify reversible Haar code.

Rather than have multiple independent implementations, use a common
 kernel.
First version of the intra paint code (not used by anything)
Adding some comments
Fixes a rare overflow on black and white images
od_intra_paint_encode() no longer overwrites the input
Making the code a bit faster by only using half the directions
Adds block size decision to intra paint
wip
wip2
block size decision allocated dynamically