nir/types: Add helpers for working with sampler and image types