Fix desync introduced by dd3fca176f087d8fe72ddf2e972d728ef92d941f

Note that dd3fca176f087d8fe72ddf2e972d728ef92d941f itself fixed by
accident another desync introduced by
f317efd3bd8fa07ba5b7cfca139712ac3b200a78.
Add more assertions to level 3 MV encoding

This should make it harder to introduce desyncs like the one fixed by
by the previous commit.
Fix calculation of MV expectation

We were calculating E(ox) instead of E(abs(ox) - 3 | abs(ox) >= 3) (same
for oy).
Results on video-1-short:
           RATE (%)  DSNR (dB)
    PSNR -0.09505  0.00506
 PSNRHVS -0.10656  0.00841
    SSIM -0.09582  0.00459
FASTSSIM -0.10099  0.00617
Simplify (and improve) the adaptation of MV expectation

Use generic_{encode,decode} to do the adaptation instead of doing it by
hand.
Results on video-1-short:
           RATE (%)  DSNR (dB)
    PSNR -0.01933  0.00103
 PSNRHVS -0.02247  0.00178
    SSIM -0.01943  0.00093
FASTSSIM -0.02078  0.00127