Allow ordering by escaped sql

Fixes #311

Note that I'm not sold on the name `orderSql` so feel free to discuss or change it.
Reasoning given in issue mentioned above.