Fix TNL bugs triggerd by !4466
The first 3 commits should fix all of the i915 CI failures noted in #2746 (closed). It's possible that other classic drivers using SWTNL may hit other paths with additional problems. I'll try to test at least r200 this weekend.
The remaining 6 commits just clean up some warnings and some outdated code formatting.