refactor(notifications): let every module report what waits for a visitor
The lines of the notifications page and the badge of the header came from
Counters, a class of the core that knew the tables and the permissions of the
mail, the forum, the library, the downloads and the album, and the page itself
checked the permissions of the library and the downloads. The core depended on
those modules, and so did notifications, without declaring it.
A module now reports what of it waits for the signed-in visitor through
SystemNotificationProviderInterface, an extension point of the core, and
SystemNotifications gathers what the switched-on modules report: the
notifications page lists it, the badge of the header adds it up with the unread
personal notifications. Seven providers take over: the registrations waiting in
the panel, the queues of moderation of the library and the downloads, unread
topics of the forum, letters not read, unread comments on photos, a ban and new
entries of the personal guestbook. The library, the downloads and the album get
the counts their providers need in their repositories.
Two things change on the page: the queue of the downloads shows how many files
wait rather than a bare 1, and the badge of the mail leaves out spam, counting
what the inbox calls new.
The four strings without a home in their new domain move there with their
translations in every language, and the eight that no longer belong to
notifications and system leave them. Counters::notifications() is gone; what
remains of Counters in the baseline is smaller by two references.