devilry_examiner: Updated sorting to use AS queries as required by postgres.

See #625.