[RFC] Remove a number of unnecessary includes from memory.c.

There seemed to be an extraordinary amount of includes in `memory.c`.  I'm not sure if they were there for some other purpose, but the code compiles correctly without many of them.  So, here's a PR that removes the unnecessary includes.