mesa/prog: Reuse count_vec4_slots() from ir_to_mesa.