There was a comment in the code that dynamic memory allocation could
not be used. But that is no longer true. 
Rewritten to avoid fixed size buffers.
Clean up #includes.


git-svn-id: svn://svn.valgrind.org/valgrind/branches/BUF_REMOVAL@14212 a5019735-40e9-0310-863c-91ae7b9d1cf9