Determine correct type of geometries in tree

Based on whether the child leaves are open or closed, the inner nodes now
decide whether their geometry is supposed to be a just a line or filled on
one side. In order to do so more conveniently, one geometry object is no
longer bound to one type but can hold the OpenGL data for all necessary
types. The currently desired type then needs to be specified when
rendering. The actual rendering currently looks broken, because the
stencil buffer is still missing.