Fixes for TextureManager and releaseGLObjects

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