PIM-2919 : add a compiler pass for sorters and refactor them to rely on
new interfaces
PIM-2919 : update base sorter spec
PIM-2919 : refactor entity and metric sorters to avoid to inherit from
base sorter
PIM-2919 : refactor the query compiler pass to use the same priority order than
the serializer