Cleanup whitespaces

Replace tab/space mix by spaces
Remove trailing whitespaces
Add PartialOrder module

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