Show translated shader source using WEBGL_debug_shaders in glsl tests

The translated shader source can be useful when debugging shader
translator or GPU driver issues, so display it alongside the original
source if WEBGL_debug_shaders is available.

Also includes some cleanup of related code.