Add ConfigFile support to MemoryRepos

For MemoryRepo, initialize the ConfigFile to the contents of the config named file in the repo.

To save a config file in a MemoryRepo, use a temporary StringIO with
write_to_file and then write it with repo._put_named_file.