Deduplicated the prioq struct

This type appeared previously in both the tree package and the matcher
package. Now the tree package exports both the MatchTrees and
RefMatchTrees types. The RefMatchTrees provides the same interface as
MatchTrees but using the, unexported, prioq struct instead of the
red-black tree.

This is all done to support the 'reference implementation' testing for
the core matching algorithms. Here we produce both a complex and highly
optimized structure, such as a matcher or a priority queue, as well as
an 'as simple as possible' reference implementation. Testing is now a
matter of ensuring these two implementations produce identical results
for the same inputs.
Package tree/ -> prioq/, plus other renaming

MatchTrees -> MatchQueues

RefMatchTrees -> RefMatchQueues

tree -> tbtree