invalidateButMoveToNewInstance(details) {
        let result = new WglTexture(this.width, this.height, this.pixelType);
        result._textureAndFrameBufferSlot = this._textureAndFrameBufferSlot;
        let invalidated = () => { throw new DetailedError("WglTexture's value accessed after invalidation.", details) };
        this._textureAndFrameBufferSlot = new WglMortalValueSlot(invalidated, invalidated);
        return result;
    }
For catching use-after-free bugs, despite texture pooling.
Moves the underlying WebGLTexture to a new instance, and marks this instance as invalidated.
@param {*} details
@returns {!WglTexture}