Changed inclusion in headers and added logMem().

Changed inclusion in XML parser source files.
Removed XML parser dependency for common.h, since it badly
includes useless files from SDL, not needed in common.h or .c
anyway.
Added a function to log dynamically allocated memory.