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".
I don't think GLSL for ES2 permits macros with arguments; you'll need to define a local function. Unfortunately, the function syntax is weird; it needs to be

    function void sdiv(in int a, in int b, out int result)

rather than 

    function int sdiv(int a, int b)