Finer (unscaled) quantizer patch

Allow quantizer (now quality) parameter to be fractional up to
OD_COEFF_SHIFT bits.  Quantizer is now mapped and scaled (if needed)
at setting time, rather than being blindly scaled up by OD_COEFF_SHIFT
when used.
Increase bitrate precision in motion estimation.

We need this before we can start using more accurate rate estimates.
This merely adds 3 fractional bits to all rate estimates, but does
 not actually change how estimates are made (so they are all still
 whole-bit values, just 8 times bigger now).
We steal 3 bits from the lambda precision to compensate, so the
 total dynamic range should be the same.
Output encoding status with a newline when not attached to a tty.

Useful when dumping stderr to a file.
Include unistd.h on POSIX. Fixes warning introduced in #364.
Use associative arrays in rd_average.sh.

This preserves the codec quality parameter used by the different codecs
 supported in rd_collect.sh.
yuvjpeg: fix trivial leak