nir: Generalize the "is per-vertex variable?" helpers and export them.