st/mesa mega cleanup for NIR
This contains all cleanups from !2181 (merged) and additional commits have been added on top.
The only functional changes are (hopefully) the last 2 commits and the 5th most recent commit.
12 files changed, 377 insertions(+), 809 deletions(-)