Fix the other bug in shader compilation

The issue was that shaders can still link even when the fragment shader
failed to compile. So we need to check separately that all the sources
compiled. We also put in error reporting for each shader stage here.