Let configuration use string keys

Sometimes we need strings access e.g. when it's user input to avoid memory leaks. Update of old and forgotten PR #2582.