Mipmapped texture arrays

Fixed TextureUtil to properly handle mipmapped texture 2d arrays and 3d textures
Merge pull request #128 from GreenCubes/patch-1

 * Fix issue where using a texture array with pregenerated mipmaps would fail with a GL error.