This CL adds some validation checks. Following CLs will add further checks.
This CL adds some validation checks. Following CLs will add further checks.

This CL also changes pointer declarations from "type *variable" to "type* variable" to follow other OTS code.

BUG=none
TEST=compiled

Review URL: https://codereview.appspot.com/6139064

MIPS/external-chromium_org-third_party-brotli-src,AOSPU/external_chromium_org_third_party_brotli_src,bxchusun/le-huong-van,seanjensengrey/font-compression-reference,MIPS/external-chromium_org-third_party-brotli-src,CyanogenMod/android_external_chromium_org_third_party_brotli_src,robryk/font-compression-reference,seanjensengrey/font-compression-reference,google/woff2,android-ia/platform_external_chromium_org_third_party_brotli_src,android-ia/platform_external_chromium_org_third_party_brotli_src,robryk/font-compression-reference,rsheeter/woff2,CyanogenMod/android_external_chromium_org_third_party_brotli_src,Omegaphora/external_chromium_org_third_party_brotli_src,bxchusun/le-huong-van,Omegaphora/external_chromium_org_third_party_brotli_src,robryk/font-compression-reference,khaledhosny/woff2,CyanogenMod/android_external_chromium_org_third_party_brotli_src,AOSPU/external_chromium_org_third_party_brotli_src,MIPS/external-chromium_org-third_party-brotli-src,anthrotype/woff2,bpsinc-native/src_third_party_brotli_src,bpsinc-native/src_third_party_brotli_src,android-ia/platform_external_chromium_org_third_party_brotli_src,AOSPU/external_chromium_org_third_party_brotli_src,seanjensengrey/font-compression-reference,bpsinc-native/src_third_party_brotli_src,Omegaphora/external_chromium_org_third_party_brotli_src,bxchusun/le-huong-van,bxchusun/le-huong-van