perf(messages): caches unread messages count to reduce queries

Fixes #6942
I probably need to turn off access control for this?