Added sorting by name.

Sorts by last name. Iterates through each letter of the last name, swaps
if need be. Functions quite closely to sort_by_id().