Issue11 2

Implement cmdline PNG output 

Lots of refactoring. the main change:

GLView becomes a 'parent' class for QGLView and OffscreenView.