Allow all query expressions where only fields was allowed

`order_by`, `group_by` and `distinct` now allow all forms of query
expressions instead of only allowing lists of fields.