Add support for the final 'implicit pass'.
This is the thing where if the last pass of a shader doesn't set
a specific output size we render it straight to the screen, but if it
does then we have to render to another framebuffer object, then render
*that* to the screen without any shader at all.
This also includes some refactoring; the 'draw texture to screen'
and 'draw texture to framebufferobject' methods both involved binding
a texture, setting a filter, then drawing a textured quad, so that was
broken out into a helper function.