plug huge memory leak, fix graphs, refactor structure comprehension

- analysis showed that I needed to call release on xdmf arrays or they are never released
and it takes up more an more memory with time varying data.
- refactored the way it understands hierarchy for clarity and performance
- fixed typos in graph parsing from refactoring
- left in experimental code that reads from buffer instead of file and prevents h5 from constantly closing files

Change-Id: If1fcb71a5ef220a6a9315403325cb29434671316