[Core] Add the ability to sort menu categories
This adds the ability to sort the top-level menus via a new "menu_categories" table. GetMenuCategory returns a new MenuCategory class rather than a string, which permits us to store the metadata that the UserPageDecoration needs for sorting.
A new (fairly trivial) middleware is added to populate the MenuCategory::singleton's cache and if a module uses a menu category that is not in the menu_categories table an exception is thrown. This is intended to prevent typos and ensure that all modules use a valid / existing menu category. It also takes the sorting out of the individual module's hands so that there are no inconsistencies between where any given module thinks the category should be sorted.
Within each dropdown, the sorting is still alphabetical and there is no frontend for customizing it. The default should be the same as our current almost-alphabetical sorting.
Resolves #9748
@driusan 500 errors in tests
@ridz1208 it is fixed