Add new baseQueue and underlying priority queue code and tests.

baseQueue will be embedded in all range queue implementations.
Mention that it's not thread safe. Or is there a convention that nothing is unless it is mentioned explicitly?