WIP: shader: Refactor and split emit_ios into per shader type functions
This MR is about splitting the emit_ios function into per shader type and common functions. It builds upon !44 (closed) to limit possible errors in the refactoring and is used as a preparation to fix #74 (closed), or more generally, to make it possible to support shader input arrays.
My main motivation to do this refactoring is that it is very difficult to follow the code flow in this function and see what kind of output is actually emitted for each of the shader types. The might be some duplication (i.e. the for loops over the input and output variables are now duplicated for each shader type, but since the loop body is now really easier to understand I think that is a small price to pay.