XWIKI-11163: Cache wiki-based configuration sources
* fix a few bugs