DEV: Plugin API to add to document title count (PR #14449)

This adds the ability to add additional numbers to the document title. Used in the unreleased chat plugin to add unread direct message counts to document title.

This is hard to test, because the numbers in the title only get updated if the browser doesn’t have focus… and I tried to find how to do that in qunit and came up empty.