Per-band activity masking tuning
Fixes some PVQ math.

Turns out that the way we compute the companding exponent based on the
masking exponent was wrong, but the code itself is correct.
Making sure K is always non-zero when coding a residual

Also moves the gain=0 case to the search init. Behaviour is bit-exact.
Apply the quantization step size in the companded domain

This makes the quality of all bands vary the same way regardless of the
activity masking beta.
Adds actual activity masking

Off by default, with OD_DISABLE_MASKING
Adds inter-band masking

Energy in lower frequency bands can reduce the allocation for higher bands.
Not yet implemented for the 16x16 top octave.
Change block size as a function of the bitrate

psy_lambda now increases with quality so that we use smaller blocks at high
quality and larger blocks at low quality.
Adds a maximum value argument to the generic encoder

Saves ~0.75% bitrate on subset1 for an identical output.
Using the max theta value for PVQ RDO
Splits the PVQ generic coder model in 3 (ref, noref, theta)
Tuning the generic_encoder. Saves about 0.7%, mostly on DC.
Cleaning up pvq_encode() and pvq_decode() to avoid code duplication

No change to the bit-stream
Adaptation of the noref probability and disables noref coding when ref=0

Still need to find efficient way to code up to 4 noref flags per symbol
to reduce entropy coder calls.
Makes PVQ expectations and noref probs dependent on the block size

           RATE (%) DSNR (dB)
    PSNR -1.28035 0.0952204
 PSNRHVS -1.42667 0.129028
    SSIM -1.28546 0.0703612
FASTSSIM -1.35073 0.0500206
Addressing most comments on issues 218, 220, 221, 222, 223, 224, 231
More review fixes: 221, 224, 246, 247, 248, 249