Sort the badges on the user profile page

Also clean up UserBadgesController so it isn't doing two things in one
method