Fixes for testtex

Removes float-to-double downcast warnings and allows several texture test cases to run successfully on MSVC. Those tests were failing due to an error in the code generated for ```map_wrap``` with optimizations turned on.