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
player_example: give warning on skeleton streams
More accurate MV rate estimation

This could be even more accurate by making mv_small_rate_est adaptive or
by using a better estimate for the >=3 part of the component magnitudes,
but so far my attempts to do so have only decreased quality.

Results on video-1-short:
           RATE (%)  DSNR (dB)
    PSNR -0.89100  0.04614
 PSNRHVS -1.04905  0.08080
    SSIM -1.09365  0.05120
FASTSSIM -1.30466  0.07874

Results on sintel_trailer_2k_short:
           RATE (%)  DSNR (dB)
    PSNR -4.66465  0.22110
 PSNRHVS -5.80139  0.31411
    SSIM -4.75017  0.16922
FASTSSIM -4.92864  0.21090
Remove unused MV visualization code
encode: do quality scaling internally
encode: factor copy_and_pad out of encode_img_in
encode: use QUALITY_SHIFT
encode: move img_dump_padded out of encode_img_in
encoder_example: remove duplicate code
logging: fix memory leak
encode: refactor
Bypass PVQ sythesis when the gain is zero
Add od_block_size enum to give names to the block sizes
Rewrite superblock splitting code to make it easier to understand

Also try to follow the coding style more closely.
Update bd_rate.m to run from any directory.
Remove support for scalar quantization

Reasons are:
- No quantization matrix support (and none planned) so impossible to have a
  reasonable comparison with PVQ anyway
- We need to reduce the number of interactions between OD_DISABLE* flags
- We need to tune tools for PVQ rather than scalar, which will make scalar worse
- The new intra and CfL patches can't work with scalar

Conflicts:
	src/decode.c
	src/encode.c
Simplifies CfL by signalling the gain and sign through PVQ
decode: refactor
state: check ref_img allocation