ConfigManager class for frontend config

This separates out a ConfigManager class which the config handlers use.

My objective is to provide an API whereby Python code can modify frontend config, e.g. to enable an extension on installation. See also #7040.