shaders master merge and mipmap fix
I'm submitting this PR because I tried backporting the mipmap fix to plain master and keep getting crashes. Since that fix would conflict with shaders anyway and mipmaps aren't a huge gamebreaking feature, I figure it's fine to just leave them in shaders....
the fix is ensuring that mipmap textures are always powers of 2 in MakePatch. I haven't fully tested this, including seeing if it breaks non-po2 walltextures.