Adding sort function.

As opposed to sort_by_key, this takes just keys.

refs #83