Add new baseQueue and underlying priority queue code and tests.

baseQueue will be embedded in all range queue implementations.
most all(?) of those Errorf's really could/should be Fatalf's because having one fail means you're pretty much guaranteed the rest after it are broken too.