Created by: lunks
This allows us to sort by these associations using a given attribute that uses name by default but can be overwritten by the static method default_sort on the associated class.
This is an initial implementation, feedback is more than welcome. I'd like to know if this is something that is desirable and/or if this approach is ok for the given problem.
Relates to #278.