(+) Implement simple sorting operator

(+) some tests for sorting
(+) handle predicates of the form (ARGUMENT || LITERAL || BOOL ||
NUMERIC) COMPARATOR (QID || UID)