Fix overzealous saving/clearing of the siteconfig cache for avatar settings.
Review Request #8874 — Created April 5, 2017 and submitted — Latest diff uploaded
When populating the avatars registry, the list of enabled backends and the default backend are saved into the siteconfig, which then results in the siteconfig being dirty. This can cause the siteconfig cache to be emptied too often, as it's being cleared on all threads every time a new thread spins up, along with a couple times during initial setup of the avatar support. Now the settings are conditionally written to the siteconfig only if they've changed, ensuring we don't save unless we have something useful to save
Unit tests pass.
No longer saw my debug info showing the siteconfig cache was being
cleared, or the extra siteconfig database queries.