Mipmap generation for mgcb

Add basic support for mipmap generation and also removes color bug in texture resizing.