Fixes for TextureManager and releaseGLObjects

Fixes for TextureManager and release of textures/orphaned texture objects. It fixes #148 and #162. Also it releases texture memory on the pagedLOD.