Implement StringToKeyValues.

The test only really covers a valid KV string as internally LoadFromBuffer always returns true, even if parsing errors occur.