Allow datagrid columns to provide a custom sort field.

Datagrid column sorting relied on the db_field attribute of a Column,
but if a column needed to dynamically compute which field to use, it was
pretty much out of luck without resorting to hacks.

Instead, we now use get_sort_field(), which returns the field used for
sorting. This defaults to db_field, but can be overridden by subclasses.