!UPSTREAM: i965: generalize pull const upload in preparation for GS.

TODO:
- Move earlier.
!UPSTREAM: fixup GS pull constant upload

TODO:
- Merge into "Support UBOs by generating surface state and bindi"