Factorize the coordinate generation in map_warp.

This fixes several texture test cases failures in Windows due to a bug in the MSVC optimizer,
which was not generating correct code for map_warp with the optimizations enabled.
Fix double-to-float downcast warnings in testtex.
Update testsuite ref image after recent testtex change