GLSL: Handle more intrinsics, fix bugs in code generation and texture transfer

Map intrinsics to correct GLSL functions:
- trigonometric functions (sin, cos, tan, asin, acos, atan, atan2)
- exponential functions (pow, exp, log)
- general functions (floor, ceil, lerp)

Since GLSL doesn't support bit arithmetic, don't use C backend to generate
code for "Mod" and "Div".
It *should* permit macros with arguments, but there is actually little reason for us to depend on the preprocessor since it's just as easy to directly generate proper GLSL code.

(In this case, it turns out that GLSL ES does support integer divisions, so there's no need for something like sdiv().)