- Helper function constructs a permutation of the list of menu-items that need to be sorted, then sorts and tests.
- Test ten permutations of the list of items (not all of them, since it's a stable sort some permutations must produce a different sorted output, so no std::next_permutation here).
Fix stable sorting of menu items.
In the case i1 installed, but in section Main, and i2 uninstalled, this
lambda returned False, meaning that i1 was not less than i2. Change
comparison to always sort installed before uninstalled.