gl-renderer: Minimize state changes
Some states like the blend function and the enabled generic vertex attrib arrays are constant across draw calls. This merge request proposes to change to them once per per pass (output, border and shadow repaints) to minimize changes.