glsl: move more varying linking code to link_varyings.cpp