Merge pull request #17 from fr500/master

Reworked libretro solution
d3d: Add FlushBeforeCopy().
d3d: Add RebindFramebuffer().
d3d: Move UpdateFromMemory() to common.
d3d: Fix colors in UpdateFromMemory().
d3d: Support arbitrary size framebuf uploads.
Move ForgetLastTexture() into DrawPixels().
d3d: Unify ReadFramebufferToMemory() signature.
d3d: Unify BlitFramebuffer() as well.
sprintf->snprintf, fix some too short buffers
d3d: Converge block transfer logic.
d3d: Initial implementation of framebuf download.

Not working, or not working properly...
d3d: Don't flip blits when downloading.
d3d: Support the Danganronpa hack.
d3d: Fix flipped y in framebuf blit.
d3d: Download from the specified region only.
d3d: Oops, switch over block transfer logic.
d3d: Track memory copies/uploads/downloads.
d3d: Always download 8888, at least for now.
d3d: Expliticly bind after fbo_create().

In GLES, this is a tiny call that checks a cache, but it's necessary in
Direct3D 9.