Fix ordering with joined tables

This commit should fix the following issue:
When you have two orderable models that have many_to_many relation, then attempt to query them ordered will fail with complain about 'element_order' ambiguity. So we need to add table name before the field value.
Since rails 4 (or maybe 3?) it is done automatically in the way specified in the commit.