Use options object in MaxHeap constructor and allow passing a custom IdMap class