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".
The main reason is that uint8 and uint16 textures are represented as normalized floats in GLSL. Embedding them in int32 leads to a lot of additional type casts and causes tricky roundoff problems. For example, a simple uint8 pixel copy we would have to generate code a la

    glFragmentColor = float(int(texture2D() * 255 + 1.0/512)) / 255.0

and I'm not even sure this is correct ;)