WIP: freedreno: ctx should hold ref to dev

The ctx should hold ref to dev to avoid problems if screen is destroyed
before ctx.
WIP: various compiler fixes
WIP: freedreno: add tgsi lowering pass
WIP: freedreno/compiler/a3xx: remove lowered instructions
WIP: add prims-emitted driver query
WIP: freedreno/a3xx/compiler: compiler cleanups

Drop color/pos/psize_regid, plus a few compiler and IR cleanups.
WIP: freedreno: resync compiler headers
WIP: freedreno/a3xx: fix const confusion

Gallium can leave const buffers bound above what is used by the current
shader.  Which can have a couple bad effects:

1) write beyond const space assigned, which can trigger HLSQ lockup
2) double emit of immed consts, first with bound const buffer vals
followed by with actual immed vals.  This seems to be a sort of
undefined condition.
WIP: freedreno/a3xx: handle frag z write