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