R_MipMap with unpack alignment, R_MipMap16

A small part of KTX support. KTX has unpack alignment of 4, so the
mipmap generation code must support alignment. Also add RGB565, RGBA4444
and RGBA5551 mipmap generation (aligned to 4 since it's used only for
KTX).