Smartly sort versions for display.