Add PartialOrder module

A functor to help compute partial orderings
Add explicit ordering with %priorities declaration
Cleanup integration of %priorities