Flip framebuffers when downloading their pixels.

It seems like this is where it was being done...
Fix buffer overflow in MakePixelTexture().
Download before, upload after.  Fix save pictures.

Otherwise, it only works if it does it every frame, and then it's a frame
behind.  Also fixes Tales of Phantasia X's fades and etc.
Skip some code if things are outside framebuffers.

Small optimization.
Track more kinds of memcpy operations on fbos.
Cleanup reporting of block/memcpy transfers.
Refactor framebuffer size calculation.
When there are multiple copies, don't redownload.

This should improve performance when there are lots of little transfers.
If multiple framebuffers match, offset correctly.
Flip framebuffer y correctly.

And here I just corrected another commit doing this wrong a few weeks ago.
Shame.
Correct end framebuf range check.
Detect if the game uses block transfer slivers.

In that case, it's better to read it once, than multiple times.
Improves performance and graphics in Grand Knights History.
Download only the necessary subareas.

Performance improvement in Tactics Ogre.
UpdateMemory() now returns whether to skip the cpy.

This way it can do it itself as necessary in the right order.
Fix block transfer upload.

Wasn't working properly, rendered to the wrong target.

No longer need the UpdateFromMemory() thing, now.
Allow memcpy gpu downloads.

Fixes FF4 battle transition effect, Trails in the Sky menu, etc.
Support memcpy uploads to fbos.

Makes Vempire look right (has never worked before in any rendering mode.)
Schedule the FBO blit during multithreading.

This was it's properly ordered with draws, and it runs on the right GL
context.
Mark texture as needing reset after upload.
When multiple framebuffers match, use nearest.