st/mesa: fix a bug in and re-org setup_interleaved_attribs()