FIX: Sorting a DataQuery over a relation.

When sorting a DataQuery over a relation, the SQLQuery automatically included the sort column. The issue with the implement is that potentially the joined record has a field with the same name as the source record causing it to be overridden.

In the attached test case, without the patch the title will be set to 'Bar' rather than 'Foo'.

This patch aliases the sort column. Alternativally a patch would be to
Merge pull request #3436 from dnadesign/fixsortonrelations

FIX: Sorting a DataQuery over a relation.