This commit implements the sort functionality for the user lists (by name, email, last_activity) and ordergroup lists (by name). It is a first attempt addressing issue #560.