Add custom sorting methods

I was looking for a way to specify a custom search method for a table column, but didn't find anything. I followed the pattern from MetaSearch of defining `sort_by_x_asc` and `sort_by_x_desc` methods that get called if available and return a scope. If you'd prefer a different interface, I can change it to something else.

I made this request before on the rails4 branch (#2469), but it was closed during the merge of that branch into master.