make RenderState accessible from child-classes
better check for valid context

in multicontext-mode, we cannot just use GLEW_... without having called glewInit() first

Closes: https://sourceforge.net/p/pd-gem/bugs/230/