* fix: persist group order on reopenning AppFlowy
Currently if you change groups order, on restarting AppFlowy they
will go back to what they were before.
This was because merge_groups function was not respecting the group
orders which were saved before as group settings.
* refactor: enhance the merge_group function
* refactor: use extend instead of for loop