glsl/linker: refactor link-time validation of output locations