Add new baseQueue and underlying priority queue code and tests.

baseQueue will be embedded in all range queue implementations.
Oh I see. You're always wrapping around the baseQueue and that's where the locking should be. Sorry.