Add new baseQueue and underlying priority queue code and tests.

baseQueue will be embedded in all range queue implementations.
500 microseconds wasn't enough on the circleci machines. We were getting diffs of like 550us