Sort the subcategories alphabetically

After sorting the subcategories to move those without one to the end,
sort them alphabetically by first letter.
Sort categories alphabetically

In order to sort the tracked items UI results alphabetically by
category, the return value must be changed into an array with the
category an attribute of each element.  This caused the need to create
a collection in the UI to handle this array, which makes more sense
anyway.

Also sorting alphabetically can be done just by comparing the entire
string, not just the single letter.  So fix subcategories to sort the
entire string.