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.