!UPSTREAM: Major improvement in clip distance lowering (I hope)

TODO:
- Squash with others.
!UPSTREAM: Fix gl_ClipDistanceIn lowering for params

TODO:
- Full piglit test
- Squash