Fix category does not exist error

If we get into a state where a category doesn't exist then we end up in a denial of service state.
This impacts pages like My View, View Issues, and others.

We can get into this state due to several cases that we should fix.  However, there is no reason why we won't handle them like we handle unknown enumerations.

This change adds a category_exists check in category_full_name() api, and changes category_exists to populate the cache to not incur extra overhead.

Fixes #15420