Added context reset when 2nd order coefficients are cleared
Added context reset when 2nd order coefficients are cleared

As discovered in path 10 of Change Ia12acd2f, reset 2nd order coeffs
without reset of above and left coding context may have introduced
problem that causes encoder/decoder mismatching. This commit added
update to coding context when the 2nd coefficients are cleared.

In addition, this commit also introduced early breakout in the checks
to speed up when coefficients are too significant to be cleared.

Change-Id: I85322a432b11e8af85001525d1e9dc218f9a0bd6

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