vp9: Fix to active_best for GF/ARF in 1 pass vbr.
vp9: Fix to active_best for GF/ARF in 1 pass vbr.

Correct the setting of Q basis of GF/ARF in 1 pass vbr.

Existing logic would switch to using avg_QP of key frame if
avg_QP of inter is less than active worst (even if key frame is
not last frame).

Instead fix the logic (as per the comment) to use the lower of
active_worst_quality and avg_Q for inter as basis for GF/ARF
active_best_quality (unless last frame was key frame).

Increase in metrics: AvgPSNR/SSIM up by ~0.7/0.3 on ytlive set.

Change-Id: I9a628378ec6684bfda9457ebfc2384ef6d8579f7

Topopiccione/libvpx,mwgoldsmith/vpx,Topopiccione/libvpx,Topopiccione/libvpx,mwgoldsmith/vpx,mwgoldsmith/libvpx,webmproject/libvpx,GrokImageCompression/aom,GrokImageCompression/aom,luctrudeau/aom,Topopiccione/libvpx,mwgoldsmith/vpx,smarter/aom,luctrudeau/aom,ShiftMediaProject/libvpx,mwgoldsmith/libvpx,luctrudeau/aom,webmproject/libvpx,luctrudeau/aom,smarter/aom,mwgoldsmith/libvpx,Topopiccione/libvpx,mwgoldsmith/vpx,luctrudeau/aom,ShiftMediaProject/libvpx,mbebenita/aom,mbebenita/aom,mbebenita/aom,smarter/aom,GrokImageCompression/aom,webmproject/libvpx,mbebenita/aom,mwgoldsmith/vpx,mwgoldsmith/libvpx,mbebenita/aom,smarter/aom,webmproject/libvpx,GrokImageCompression/aom,mbebenita/aom,webmproject/libvpx,GrokImageCompression/aom,ShiftMediaProject/libvpx,ShiftMediaProject/libvpx,mwgoldsmith/libvpx,smarter/aom,mwgoldsmith/libvpx,mbebenita/aom,ShiftMediaProject/libvpx,smarter/aom,mbebenita/aom,GrokImageCompression/aom,Topopiccione/libvpx,luctrudeau/aom,webmproject/libvpx,mwgoldsmith/vpx,mbebenita/aom