Incorporate generic priority 'library' from Oberon0

It can be found here:
https://github.com/cwi-swat/oberon0/blob/master/src/ldta/oberon0/util/Priorities.rsc
Refactoring of parentheses complete.