Allows configs to be read from a string

Adds `loadFromString`. I think that most of the actual config loading could be refactored into one method, with `loadFrom*` just applying the appropriate code.