i965/vec4: Extract function to set up vec4 prog key for precompiling.

This will allow us to re-use it for precompiling geometry shaders.
i965/gs: Precompile geometry shaders.