Refactor heap object parsing from adding objects to the heap

This pull request contains incremental refactoring towards making the parsing code usable for parsing a second heap in order to implement a diff command.  Now the read_heap_object method can be used to read objects for a second heap without modifying the initially loaded heap.