refactored Heap. remove ReferenceNode if there are no pointsToEdges from
it (in removeNullObject)