[DDC-3108] Fix regression where join aliases were no longer accessible in Criteria expressions

The solution to issue DDC-2764 was to blanket prefix all the fields with the root alias. The result was then impossible to use fields from multiple FROM tables or a JOIN. 

This patch injects all available aliases into the comparison, if a field uses one of the aliases it will pass without modification. If it is an unknown alias it will prefix the first rootAlias listed using the same functionality as the deprecated getRootAlias() function.

Also improves the ORDER BY on Criteria expressions, again introduced by [DDC-2764] using the above functionality, this was out of scope of bug [DDC-3108].

Added unit tests to test new functionality.
This test should also have an `@group`