make sortRows more explicit, add forward and reverse sorting

This makes the sorting of modes more explicit, by adding 'date' as a value which can be explicitly passed in to the directive. Each mode can also be passed as forward or reverse (ascending or descending), which allows more control over sorting features. There is no reason I can see that this will break backwards compatibility with existing implementations.