memory usage optimizations for read and write operations

I think we can remove this function and replace its calls with something like:

```C
copiedString = makeStringInfo();
appendBinaryStringInfo(copiedString, sourceString->data, sourceString->len);
```

This function has been used twice, so I think having it as a separate function doesn't save LOC, and I think these two lines aren't very unreadable. So I am inclined to inline these two lines.

What do you think?