Allow comparator to be a function

This is useful for sorting by the value of can.compute
merge
sort with comparator function test
Merge pull request #440 from DVSoftware/patch-2

Allow comparator to be a function