nir: keep track of the number of input, output, and uniform slots
nir: add a pass to remove unused variables

After we lower variables, we want to delete them in order to free up
some memory.
nir: add a pass to lower sampler instructions
nir: add a pass to lower system value reads
nir: add a pass to lower atomics
nir: add an optimization to turn global registers into local registers

After linking and inlining, this allows us to convert these registers
into SSA values and optimise more code.
nir: calculate dominance information
nir: add a pass to convert to SSA
nir: add an SSA-based copy propagation pass
nir: add an SSA-based dead code elimination pass