Normalise texture target enum when first set

* E.g. this will change GL_TEXTURE_CUBEMAP_FACE_POSITIVE_X to just
  GL_TEXTURE_CUBEMAP. We do it once on set rather than everywhere we expect
  to use the current type.