extra size check for security
extra size check for security

no speed diff observed by removing the test before calling BitWriterResize().

+ remove some unnecessary memset() in VP8LBitWriter
+ fix mixed code/variable-decl in BIG_ENDIAN mode

Change-Id: I36be61f83d10a43e4682b680c2dae0e494da4218

abwiz0086/webm.libwebp,comoyo/gonzo-libwebp,ya7lelkom/libwebp,PKRoma/libwebp,webmproject/libwebp,ya7lelkom/libwebp,yohunl/libwebp,kim42083/webm.libwebp,abwiz0086/webm.libwebp,altogother/webm.libwebp,comoyo/gonzo-libwebp,Suvarna1488/webm.libwebp,PKRoma/libwebp,ya7lelkom/libwebp,rxl194/libwebp,appunite/libwebp,jacklicn/libwebp,jiehu5114/libwebp,zofuthan/libwebp,Acidburn0zzz/webm.libwebp,Acidburn0zzz/webm.libwebp,Suvarna1488/webm.libwebp,ericmckean/webm.libwebp,comoyo/gonzo-libwebp,gshORTON/webm.libwebp,cysp/libwebp,appunite/libwebp,reimaginemedia/webm.libwebp,dumganhar/libwebp,keane83/BLE_IM,altogother/webm.libwebp,imazen/libwebp,appunite/libwebp,kleopatra999/webm.libwebp,kalli123/webm.libwebp,Tekserve/libwebp,reimaginemedia/webm.libwebp,Tekserve/libwebp,Maria1099/webm.libwebp,Suvarna1488/webm.libwebp,Tekserve/libwebp,kim42083/webm.libwebp,PKRoma/libwebp,keane83/BLE_IM,iniwf/webm.libwebp,zofuthan/libwebp,zofuthan/libwebp,Aexyn/libwebp,jacklicn/libwebp,PKRoma/libwebp,iniwf/webm.libwebp,altogother/webm.libwebp,Maria1099/webm.libwebp,gshORTON/webm.libwebp,ya7lelkom/libwebp,jacklicn/libwebp,Aexyn/libwebp,gshORTON/webm.libwebp,Acidburn0zzz/webm.libwebp,PKRoma/libwebp,rxl194/libwebp,reimaginemedia/webm.libwebp,yohunl/libwebp,cysp/libwebp,appunite/libwebp,kleopatra999/webm.libwebp,kalli123/webm.libwebp,kim42083/webm.libwebp,kalli123/webm.libwebp,Maria1099/webm.libwebp,keane83/BLE_IM,matanbs/webm.libwebp,kim42083/webm.libwebp,ericmckean/webm.libwebp,ericmckean/webm.libwebp,Distrotech/libwebp,appunite/libwebp,redengineer/libwebp,Tekserve/libwebp,webmproject/libwebp,Acidburn0zzz/webm.libwebp,jacklicn/libwebp,Suvarna1488/webm.libwebp,altogother/webm.libwebp,imazen/libwebp,altogother/webm.libwebp,redengineer/libwebp,matanbs/webm.libwebp,abwiz0086/webm.libwebp,rxl194/libwebp,cysp/libwebp,abwiz0086/webm.libwebp,redengineer/libwebp,Aexyn/libwebp,gshORTON/webm.libwebp,ttyangf/libwebp,yohunl/libwebp,jiehu5114/libwebp,appunite/libwebp,matanbs/webm.libwebp,reimaginemedia/webm.libwebp,jiehu5114/libwebp,webmproject/libwebp,Aexyn/libwebp,matanbs/webm.libwebp,comoyo/gonzo-libwebp,zofuthan/libwebp,comoyo/gonzo-libwebp,kalli123/webm.libwebp,zofuthan/libwebp,PKRoma/libwebp,dumganhar/libwebp,webmproject/libwebp,jiehu5114/libwebp,redengineer/libwebp,yohunl/libwebp,comoyo/gonzo-libwebp,matanbs/webm.libwebp,ya7lelkom/libwebp,comoyo/gonzo-libwebp,jiehu5114/libwebp,reimaginemedia/webm.libwebp,Maria1099/webm.libwebp,yohunl/libwebp,jacklicn/libwebp,ttyangf/libwebp,kleopatra999/webm.libwebp,Distrotech/libwebp,kleopatra999/webm.libwebp,Acidburn0zzz/webm.libwebp,redengineer/libwebp,kalli123/webm.libwebp,Suvarna1488/webm.libwebp,gshORTON/webm.libwebp,kim42083/webm.libwebp,Distrotech/libwebp,ericmckean/webm.libwebp,rxl194/libwebp,keane83/BLE_IM,iniwf/webm.libwebp,webmproject/libwebp,dumganhar/libwebp,imazen/libwebp,kleopatra999/webm.libwebp,iniwf/webm.libwebp,ericmckean/webm.libwebp,keane83/BLE_IM,imazen/libwebp,ttyangf/libwebp,Maria1099/webm.libwebp,ttyangf/libwebp,rxl194/libwebp,imazen/libwebp,Aexyn/libwebp,ttyangf/libwebp,cysp/libwebp,iniwf/webm.libwebp,abwiz0086/webm.libwebp