Fixed errors in Texture Code

Fixed incorrect handling of array texture mipmap levels
Fixed incorrect texture delete behaviour
Fixed missing compile instruction for texture in ktxviewer