Add requirement for a custom sort function to IReferenceFormatter interface.
Implement custom sort functions for both 'dotted' and 'grouped_by_three' reference formatters.