Add new baseQueue and underlying priority queue code and tests.

baseQueue will be embedded in all range queue implementations.
testing-only so it doesn't matter, but would this leak memory in practice?
I imagine the append() that causes an internal reallocation will give the growing unused chunk of memory back along with the rest and not reallocate it.