Add new baseQueue and underlying priority queue code and tests.

baseQueue will be embedded in all range queue implementations.
I added comments that baseQueue is not thread safe. My intention is that queues are only handled by the single-threaded scanner.