!UPSTREAM: Implement state atom brw_cs_prog.

TODO:
- This patch folds in a lot of prep work that should be split out to separate patches.