Add new baseQueue and underlying priority queue code and tests.

baseQueue will be embedded in all range queue implementations.
now that you're writing and consuming from that queue, I wonder even more about thread safety.