Config: add API to load config from a dictionary