Category hierarchy: Respect display order

Because of the inherently unordered nature of JSON objects, we couldn't
respect the display order of the category hierarchy. This switches the
hierarchy response to a new endpoint that uses arrays to specify the
order of the children. This removes the need to perform a
lexicographical sort on the children before displaying them in the list.