Added sort flag to Collection::sortBy()

Allows collections/related objects to be sorted by a non-standard comparison (e.g. natural case sort, which can sort numbers properly, as opposed to crudely where 10 follows 1, instead of following 9)