Fix some VS compilation errors in the encoder.
Fix some VS compilation errors in the encoder.

  - Use std::numeric_limits<double>::infinity() instead of 1.0 / 0.0
  - Use FastLog2() instead of log2() in cost model

fouzelddin/brotli,andrebellafronte/brotli,gk23/brotli,letup/brotli,rajat1994/brotli,Endika/brotli,letup/brotli,hcxiong/brotli,Mojang/brotli,fouzelddin/brotli,kaushik94/brotli,eric-seekas/brotli,szabadka/brotli,bunnyblue/brotli,rasata/brotli,yiliaofan/brotli,kasper93/brotli,Mojang/brotli,nicksay/brotli,mcanthony/brotli,FarhanHaque/brotli,johnnycastilho/brotli,ya7lelkom/brotli,josl/brotli,FarhanHaque/brotli,jqk6/brotli,merckhung/brotli,rafaelbc/brotli,google/brotli,szabadka/brotli,yonchev/brotli,kasper93/brotli,s0ne0me/brotli,jacklicn/brotli,shilpi230/brotli,tml/brotli,archiveds/brotli,shaunstanislaus/brotli,tml/brotli,google/brotli,sajith4u/brotli,google/brotli,fxfactorial/brotli,luzhongtong/brotli,rayning0/brotli,iamjbn/brotli,shilpi230/brotli,fxfactorial/brotli,sonivaibhv/brotli,zofuthan/brotli,anthrotype/brotli,sonivaibhv/brotli,zhaohuaw/brotli,samtechie/brotli,WenyuDeng/brotli,king-jw/brotli,josl/brotli,karpinski/brotli,dwdm/brotli,samtechie/brotli,abhishekgahlot/brotli,silky/brotli,nicksay/brotli,kasper93/brotli,merckhung/brotli,google/brotli,iamjbn/brotli,emil-io/brotli,koolhazz/brotli,yonchev/brotli,rafaelbc/brotli,Endika/brotli,smourier/brotli,anthrotype/brotli,matsprea/brotli,abhishekgahlot/brotli,anthrotype/brotli,bunnyblue/brotli,lukw00/brotli,windhorn/brotli,karpinski/brotli,chrislucas/brotli,erichub/brotli,mk525/Code,hcxiong/brotli,andrebellafronte/brotli,agordon/brotli,W3SS/brotli,PritiKumr/brotli,gk23/brotli,datachand/brotli,luzhongtong/brotli,matsprea/brotli,hemel-cse/brotli,archiveds/brotli,lvandeve/brotli,mcanthony/brotli,tml/brotli,jqk6/brotli,nicksay/brotli,ebiggers/brotli,s0ne0me/brotli,luzhongtong/brotli,karpinski/brotli,shadowkun/brotli,W3SS/brotli,rajathkumarmp/brotli,tml/brotli,QuantumFractal/brotli,cosmicwomp/brotli,jqk6/brotli,chrislucas/brotli,stamhe/brotli,dwdm/brotli,kasper93/brotli,letup/brotli,mk525/Code,Merterm/brotli,Abhikos/brotli,king-jw/brotli,eric-seekas/brotli,chrislucas/brotli,johnnycastilho/brotli,lzq8272587/brotli,samtechie/brotli,smourier/brotli,ya7lelkom/brotli,leo237/brotli,Mojang/brotli,zhaohuaw/brotli,dwdm/brotli,ya7lelkom/brotli,hemel-cse/brotli,zofuthan/brotli,madhudskumar/brotli,noname007/brotli,shaunstanislaus/brotli,FarhanHaque/brotli,yiliaofan/brotli,panaroma/brotli,rayning0/brotli,thurday/brotli,szabadka/brotli,sajith4u/brotli,johnnycastilho/brotli,rasata/brotli,QuantumFractal/brotli,W3SS/brotli,fxfactorial/brotli,sajith4u/brotli,Mojang/brotli,nicksay/brotli,Merterm/brotli,hemel-cse/brotli,IIoTeP9HuY/brotli,shilpi230/brotli,andrebellafronte/brotli,ruo91/brotli,iamjbn/brotli,fouzelddin/brotli,rasata/brotli,jacklicn/brotli,BuildAPE/brotli,smourier/brotli,Endika/brotli,abhishekgahlot/brotli,bunnyblue/brotli,chinanjjohn2012/brotli,luzhongtong/brotli,s0ne0me/brotli,eric-seekas/brotli,rgordeev/brotli,mk525/Code,google/brotli,anthrotype/brotli,lukw00/brotli,carlhuting/brotli,chinanjjohn2012/brotli,szabadka/brotli,CedarLogic/brotli,ruo91/brotli,samtechie/brotli,carlhuting/brotli,silky/brotli,yiliaofan/brotli,daltonmaag/brotli,nicksay/brotli,king-jw/brotli,lvandeve/brotli,BuildAPE/brotli,PritiKumr/brotli,sajith4u/brotli,WenyuDeng/brotli,ruo91/brotli,fxfactorial/brotli,panaroma/brotli,panaroma/brotli,fllsouto/brotli,madhudskumar/brotli,rafaelbc/brotli,IIoTeP9HuY/brotli,sonivaibhv/brotli,jacklicn/brotli,shadowkun/brotli,noname007/brotli,fouzelddin/brotli,Endika/brotli,QuantumFractal/brotli,lukw00/brotli,mark2007081021/brotli,anthrotype/brotli,caidongyun/brotli,koolhazz/brotli,agordon/brotli,PritiKumr/brotli,silky/brotli,nicksay/brotli,merckhung/brotli,CedarLogic/brotli,datachand/brotli,windhorn/brotli,cosmicwomp/brotli,dragon788/brotli,daltonmaag/brotli,madhudskumar/brotli,caidongyun/brotli,leo237/brotli,dragon788/brotli,stamhe/brotli,emil-io/brotli,smourier/brotli,emil-io/brotli,leo237/brotli,daltonmaag/brotli,rajat1994/brotli,kaushik94/brotli,mark2007081021/brotli,andrebellafronte/brotli,datachand/brotli,kaushik94/brotli,ruo91/brotli,rajathkumarmp/brotli,merckhung/brotli,ebiggers/brotli,zhaohuaw/brotli,Bulat-Ziganshin/brotli,rajat1994/brotli,nicksay/brotli,mcanthony/brotli,lzq8272587/brotli,lvandeve/brotli,thurday/brotli,eric-seekas/brotli,archiveds/brotli,matsprea/brotli,rgordeev/brotli,josl/brotli,zofuthan/brotli,caidongyun/brotli,windhorn/brotli,johnnycastilho/brotli,chrislucas/brotli,ya7lelkom/brotli,dragon788/brotli,fllsouto/brotli,rayning0/brotli,BuildAPE/brotli,fllsouto/brotli,chinanjjohn2012/brotli,gk23/brotli,rajathkumarmp/brotli,CedarLogic/brotli,emil-io/brotli,cosmicwomp/brotli,Abhikos/brotli,rajat1994/brotli,ebiggers/brotli,agordon/brotli,smourier/brotli,zhaohuaw/brotli,sonivaibhv/brotli,noname007/brotli,archiveds/brotli,josl/brotli,google/brotli,iamjbn/brotli,dwdm/brotli,zofuthan/brotli,kaushik94/brotli,mk525/Code,king-jw/brotli,abhishekgahlot/brotli,Merterm/brotli,Bulat-Ziganshin/brotli,rafaelbc/brotli,panaroma/brotli,google/brotli,erichub/brotli,shadowkun/brotli,Bulat-Ziganshin/brotli,minhlongdo/brotli,IIoTeP9HuY/brotli,rgordeev/brotli,shilpi230/brotli,rgordeev/brotli,mark2007081021/brotli,W3SS/brotli,caidongyun/brotli,rajathkumarmp/brotli,shaunstanislaus/brotli,yonchev/brotli,cosmicwomp/brotli,koolhazz/brotli,jqk6/brotli,koolhazz/brotli,dragon788/brotli,lvandeve/brotli,agordon/brotli,stamhe/brotli,erichub/brotli,thurday/brotli,bunnyblue/brotli,CedarLogic/brotli,WenyuDeng/brotli,hcxiong/brotli,noname007/brotli,rasata/brotli,lzq8272587/brotli,hcxiong/brotli,shadowkun/brotli,minhlongdo/brotli,letup/brotli,PritiKumr/brotli,thurday/brotli,Abhikos/brotli,minhlongdo/brotli,karpinski/brotli,Abhikos/brotli,silky/brotli,BuildAPE/brotli,datachand/brotli,matsprea/brotli,WenyuDeng/brotli,carlhuting/brotli,lzq8272587/brotli,IIoTeP9HuY/brotli,Merterm/brotli,carlhuting/brotli,erichub/brotli,fllsouto/brotli,lukw00/brotli,QuantumFractal/brotli,s0ne0me/brotli,windhorn/brotli,hemel-cse/brotli,mcanthony/brotli,shaunstanislaus/brotli,madhudskumar/brotli,minhlongdo/brotli,gk23/brotli,daltonmaag/brotli,google/brotli,yonchev/brotli,leo237/brotli,chinanjjohn2012/brotli,jacklicn/brotli,ebiggers/brotli,rayning0/brotli,FarhanHaque/brotli,yiliaofan/brotli,stamhe/brotli,Bulat-Ziganshin/brotli,mark2007081021/brotli