Further clean up of estimate_max_q.
Further clean up of estimate_max_q.

Clean up and simplification of both estimate_max_q
variants and only call once per clip/section.

This leads to a more constrained range of Q values
across a clip / section.

Average gains across all 4 test sets:-

PSNR ~0.5%  SSIM ~0.3%

Change-Id: If77d5f7bb50939a464e117724f4da5b001c62d70

WebRTC-Labs/libvpx,shareefalis/libvpx,Suvarna1488/webm.libvpx,ittiamvpx/libvpx,kalli123/webm.libvpx,webmproject/libvpx,webmproject/libvpx,Laknot/libvpx,kim42083/webm.libvpx,Suvarna1488/webm.libvpx,jacklicn/webm.libvpx,Laknot/libvpx,mwgoldsmith/libvpx,abwiz0086/webm.libvpx,ShiftMediaProject/libvpx,Acidburn0zzz/webm.libvpx,altogother/webm.libvpx,hsueceumd/test_hui,kleopatra999/webm.libvpx,matanbs/vp982,liqianggao/libvpx,jdm/libvpx,reimaginemedia/webm.libvpx,Topopiccione/libvpx,luctrudeau/aom,jacklicn/webm.libvpx,GrokImageCompression/aom,hsueceumd/test_hui,charup/https---github.com-webmproject-libvpx-,pcwalton/libvpx,VTCSecureLLC/libvpx,matanbs/webm.libvpx,jacklicn/webm.libvpx,liqianggao/libvpx,running770/libvpx,Distrotech/libvpx,matanbs/vp982,GrokImageCompression/aom,shareefalis/libvpx,shyamalschandra/libvpx,jacklicn/webm.libvpx,iniwf/webm.libvpx,webmproject/libvpx,shareefalis/libvpx,ittiamvpx/libvpx,iniwf/webm.libvpx,matanbs/vp982,pcwalton/libvpx,webmproject/libvpx,Acidburn0zzz/webm.libvpx,liqianggao/libvpx,felipebetancur/libvpx,openpeer/libvpx_new,mbebenita/aom,abwiz0086/webm.libvpx,abwiz0086/webm.libvpx,ittiamvpx/libvpx-1,smarter/aom,ittiamvpx/libvpx,jdm/libvpx,matanbs/webm.libvpx,matanbs/vp982,altogother/webm.libvpx,jdm/libvpx,mwgoldsmith/vpx,hsueceumd/test_hui,matanbs/webm.libvpx,ittiamvpx/libvpx,mbebenita/aom,Acidburn0zzz/webm.libvpx,zofuthan/libvpx,Laknot/libvpx,pcwalton/libvpx,kalli123/webm.libvpx,lyx2014/libvpx_c,Maria1099/webm.libvpx,GrokImageCompression/aom,hsueceumd/test_hui,goodleixiao/vpx,Distrotech/libvpx,jmvalin/aom,reimaginemedia/webm.libvpx,stewnorriss/libvpx,VTCSecureLLC/libvpx,matanbs/vp982,felipebetancur/libvpx,ittiamvpx/libvpx-1,shacklettbp/aom,Distrotech/libvpx,openpeer/libvpx_new,WebRTC-Labs/libvpx,goodleixiao/vpx,smarter/aom,hsueceumd/test_hui,shyamalschandra/libvpx,zofuthan/libvpx,Distrotech/libvpx,jdm/libvpx,kalli123/webm.libvpx,VTCSecureLLC/libvpx,matanbs/vp982,Maria1099/webm.libvpx,goodleixiao/vpx,Distrotech/libvpx,smarter/aom,running770/libvpx,liqianggao/libvpx,Maria1099/webm.libvpx,running770/libvpx,mbebenita/aom,mwgoldsmith/vpx,ittiamvpx/libvpx-1,felipebetancur/libvpx,Laknot/libvpx,smarter/aom,mwgoldsmith/libvpx,shareefalis/libvpx,jdm/libvpx,Laknot/libvpx,zofuthan/libvpx,gshORTON/webm.libvpx,smarter/aom,Maria1099/webm.libvpx,mwgoldsmith/libvpx,lyx2014/libvpx_c,reimaginemedia/webm.libvpx,mbebenita/aom,running770/libvpx,Topopiccione/libvpx,ShiftMediaProject/libvpx,felipebetancur/libvpx,stewnorriss/libvpx,thdav/aom,GrokImageCompression/aom,matanbs/webm.libvpx,thdav/aom,shacklettbp/aom,kim42083/webm.libvpx,n4t/libvpx,ShiftMediaProject/libvpx,abwiz0086/webm.libvpx,kim42083/webm.libvpx,GrokImageCompression/aom,matanbs/vp982,altogother/webm.libvpx,Suvarna1488/webm.libvpx,thdav/aom,altogother/webm.libvpx,shacklettbp/aom,WebRTC-Labs/libvpx,WebRTC-Labs/libvpx,zofuthan/libvpx,mbebenita/aom,mbebenita/aom,kalli123/webm.libvpx,ittiamvpx/libvpx-1,matanbs/webm.libvpx,abwiz0086/webm.libvpx,mwgoldsmith/libvpx,jmvalin/aom,goodleixiao/vpx,stewnorriss/libvpx,shyamalschandra/libvpx,smarter/aom,running770/libvpx,stewnorriss/libvpx,shacklettbp/aom,Topopiccione/libvpx,lyx2014/libvpx_c,Topopiccione/libvpx,thdav/aom,kim42083/webm.libvpx,webmproject/libvpx,kleopatra999/webm.libvpx,kalli123/webm.libvpx,mwgoldsmith/libvpx,Acidburn0zzz/webm.libvpx,kalli123/webm.libvpx,thdav/aom,iniwf/webm.libvpx,reimaginemedia/webm.libvpx,Acidburn0zzz/webm.libvpx,jmvalin/aom,mwgoldsmith/vpx,Acidburn0zzz/webm.libvpx,ShiftMediaProject/libvpx,goodleixiao/vpx,lyx2014/libvpx_c,gshORTON/webm.libvpx,Maria1099/webm.libvpx,mwgoldsmith/vpx,kleopatra999/webm.libvpx,iniwf/webm.libvpx,Suvarna1488/webm.libvpx,shacklettbp/aom,altogother/webm.libvpx,n4t/libvpx,zofuthan/libvpx,kleopatra999/webm.libvpx,thdav/aom,ittiamvpx/libvpx,charup/https---github.com-webmproject-libvpx-,shareefalis/libvpx,mbebenita/aom,matanbs/webm.libvpx,GrokImageCompression/aom,Suvarna1488/webm.libvpx,abwiz0086/webm.libvpx,mbebenita/aom,n4t/libvpx,jmvalin/aom,openpeer/libvpx_new,shacklettbp/aom,n4t/libvpx,luctrudeau/aom,kleopatra999/webm.libvpx,luctrudeau/aom,gshORTON/webm.libvpx,Suvarna1488/webm.libvpx,charup/https---github.com-webmproject-libvpx-,webmproject/libvpx,ittiamvpx/libvpx-1,lyx2014/libvpx_c,kleopatra999/webm.libvpx,openpeer/libvpx_new,shareefalis/libvpx,Laknot/libvpx,luctrudeau/aom,jmvalin/aom,jmvalin/aom,stewnorriss/libvpx,WebRTC-Labs/libvpx,openpeer/libvpx_new,ittiamvpx/libvpx-1,jacklicn/webm.libvpx,VTCSecureLLC/libvpx,VTCSecureLLC/libvpx,Distrotech/libvpx,Topopiccione/libvpx,liqianggao/libvpx,luctrudeau/aom,lyx2014/libvpx_c,mwgoldsmith/vpx,Topopiccione/libvpx,Maria1099/webm.libvpx,mwgoldsmith/libvpx,shyamalschandra/libvpx,stewnorriss/libvpx,shyamalschandra/libvpx,gshORTON/webm.libvpx,kim42083/webm.libvpx,n4t/libvpx,altogother/webm.libvpx,pcwalton/libvpx,gshORTON/webm.libvpx,charup/https---github.com-webmproject-libvpx-,jdm/libvpx,charup/https---github.com-webmproject-libvpx-,reimaginemedia/webm.libvpx,mwgoldsmith/vpx,pcwalton/libvpx,iniwf/webm.libvpx,kim42083/webm.libvpx,running770/libvpx,mbebenita/aom,gshORTON/webm.libvpx,goodleixiao/vpx,ShiftMediaProject/libvpx,felipebetancur/libvpx,ittiamvpx/libvpx,liqianggao/libvpx,reimaginemedia/webm.libvpx,hsueceumd/test_hui,felipebetancur/libvpx,jacklicn/webm.libvpx,iniwf/webm.libvpx,zofuthan/libvpx,shyamalschandra/libvpx,luctrudeau/aom,charup/https---github.com-webmproject-libvpx-,openpeer/libvpx_new,pcwalton/libvpx,VTCSecureLLC/libvpx