Priority queue based pearl collision handler, handles multiple collisions

This is an *uncompiled* attempt to rewrite the pearl handler to use a priority queue of when pearls are expected to land. Having trouble compiling from here as I don't seem to have the right versions of Citadel and Humbug around. Please could someone take a look at it?