Add memory profiling

This pull request adds memory profiling, which is provided by http://pythonhosted.org/Pympler/. I didn't see it as a Ubuntu package, so I think it will have to be installed with the source. However, I put the import in a try/except block, so the program shouldn't fail if pympler is not installed.

Profiling results for sample XML:
12 MB file: 1.7 seconds, took 60 MB
266 MB file: 40.9 seconds, took 1141 MB

The times above are with memory profiling not enabled. It will take longer with it enabled.