!UPSTREAM: glsl: During linking, record whether a GS uses EndPrimitive().

This information will be useful in the i965 back end.

TODO:
- Test
- Move to appropriate place in series