Fix deserializing from an owned string
Up until now, when deserializing MemberName etc. from an owned string, a runtime error about a borrowed string requirement was returned. This MR fixes the issue using a Cow when deserializing a potentially owned string.