nir: Convert the builder to use the new NIR cursor API.