nir: tons of bugfixes and stuff

XXX squash me
nir: hack in a post-link conversion

For making sure things don't crash.
nir: add some more store intrinsics
nir: give array dereferences a constant index

This will help us generate less sucky code with things like matrices.
nir: add an is_packed flag

Ugly, but I can't think of anything better...
blerg
nir: add a pass to lower variables for scalar backends