user-groups: Fix reordering when name/description is edited.
user-groups: Fix reordering when name/description is edited.

The edited group iswas going to the bottom, it is not staying at its
position, so to fix this we sort by ids of the groups to maintain
proper relative order.

(Original commit also fixed another issue, but Tim replaced that with
the previous commit for a better solution).

Fixes #8692.

andersk/zulip,zulip/zulip,andersk/zulip,tommyip/zulip,synicalsyntax/zulip,eeshangarg/zulip,brainwane/zulip,timabbott/zulip,kou/zulip,timabbott/zulip,jackrzhang/zulip,hackerkid/zulip,tommyip/zulip,rishig/zulip,synicalsyntax/zulip,synicalsyntax/zulip,punchagan/zulip,dhcrzf/zulip,andersk/zulip,dhcrzf/zulip,eeshangarg/zulip,zulip/zulip,rishig/zulip,eeshangarg/zulip,tommyip/zulip,tommyip/zulip,showell/zulip,dhcrzf/zulip,synicalsyntax/zulip,shubhamdhama/zulip,rht/zulip,showell/zulip,hackerkid/zulip,dhcrzf/zulip,rishig/zulip,zulip/zulip,tommyip/zulip,hackerkid/zulip,synicalsyntax/zulip,shubhamdhama/zulip,andersk/zulip,zulip/zulip,rht/zulip,kou/zulip,eeshangarg/zulip,timabbott/zulip,zulip/zulip,rishig/zulip,jackrzhang/zulip,kou/zulip,punchagan/zulip,tommyip/zulip,rht/zulip,punchagan/zulip,hackerkid/zulip,eeshangarg/zulip,eeshangarg/zulip,kou/zulip,rht/zulip,synicalsyntax/zulip,showell/zulip,rht/zulip,dhcrzf/zulip,punchagan/zulip,jackrzhang/zulip,timabbott/zulip,rishig/zulip,andersk/zulip,showell/zulip,showell/zulip,hackerkid/zulip,brainwane/zulip,kou/zulip,brainwane/zulip,showell/zulip,shubhamdhama/zulip,zulip/zulip,rishig/zulip,shubhamdhama/zulip,timabbott/zulip,jackrzhang/zulip,jackrzhang/zulip,rishig/zulip,brainwane/zulip,hackerkid/zulip,dhcrzf/zulip,timabbott/zulip,brainwane/zulip,zulip/zulip,punchagan/zulip,shubhamdhama/zulip,jackrzhang/zulip,kou/zulip,andersk/zulip,shubhamdhama/zulip,showell/zulip,dhcrzf/zulip,punchagan/zulip,eeshangarg/zulip,brainwane/zulip,andersk/zulip,hackerkid/zulip,synicalsyntax/zulip,tommyip/zulip,punchagan/zulip,shubhamdhama/zulip,rht/zulip,kou/zulip,rht/zulip,brainwane/zulip,jackrzhang/zulip,timabbott/zulip