glsl: Add const safety to _mesa_glsl_parse_state::is_version()

Needed for the patch that follows.
glsl: Close compatibility loophole with old GLSL shaders.

GL 3.1 and GLSL 1.40 specify that in a context without
ARB_compatibility support, trying to use certain language features
(ftransform(), or various built-in variables) should result in a
compile error.

Previous versions of GLSL make no such stipulation, however for
logical consistency, they must generate compile errors too, since
otherwise that opens up a loophole to allow compatibility-only
features to be used.
main: don't maintain TexEnv and Tnl programs when using the core profile.

This functionality isn't available in core contexts, so it's just a
waste of time to try to compile the programs--they won't ever get
used.  This prevents breakages in the patches that follow, which close
loopholes by eliminating certain builtin functionality (functionality
needed by the TexEnv and Tnl programs) when a core profile is in use.
glsl/builtins: Stop exposing ftransform in the core profile.

GL 3.2 and GLSL 1.50 specify that the ftransform() function is
available only in the compatibility profile.  GL 3.1 and GLSL 1.40
make a similar stipulation (except phrased in terms of
ARB_compatibility).

Previous versions of GLSL make no such stipulation.  However, since GL
versions 3.1 and above are allowed to be mixed with older versions of
GLSL, for logical consistency, we need to avoid exposing ftransform()
in the core profile for older GLSL versions too.  Otherwise we open up
a loophole to allow compatibility-only features to be used in a core
context.

To avoid exposing ftransform() in core contexts in GLSL 1.30, I had to
remove it from the 110.vert, 120.vert, and 130.vert profile files, and
move it to a new profile file called "compatibility.vert", which takes
effect only when state->compatibility() returns true.