Memory optimizations

Two optimizations to improve Citra's memory allocation efficiency. More details in commit messages.

**Note that, due to #176, I haven't been able to test the second commit.** I have only proved it correct, not tried it.
This isn't defined, so this section is out.