Allow the sort method to be customized

The sorter method is now generated by another function that lets you specify an accessor method for finding the value to sort (so you can sort a list of objects by one of their fields), and whether to sort case senstive