Add equals/hashCode/compareTo methods to HeapReference for proper grouping and sorting
Add toString to simplify conversion to String (e.g. references)