Clear more memory, both in cleanUp() and as we go.

Combined with the TCPDI change which cleans up parsers as it finishes with
them, this substantially reduces peak memory usage when importing from
multiple PDFs.