Fix log categories

As recommended in https://github.com/joomla/joomla-cms/pull/5165, rebased the adding of categories for all log entries on staging branch.

For the intent, see above linked pull request