webtools/metrics.html: Port to the new bit accounting format
Fix DC bits accounting for non-keyframes
Don't encode motion vectors outside the frame.

They are forced to zero.
Optimize level 3 motion flags in the margin.
encode: move allocations out of encode_create
Fix typo in od_mc_predict8

Results on video-1-short:
          RATE (%)  DSNR (dB)
    PSNR  0.05477  -0.00294
 PSNRHVS -0.27886   0.02215
    SSIM -0.22127   0.01067
FASTSSIM -0.13975   0.00859
Remove incorrect assertion: level 2 MVs outside the frame can be valid