tryObjectEncoding(): optimize sds strings if possible.
tryObjectEncoding(): optimize sds strings if possible.

When no encoding is possible, at least try to reallocate the sds string
with one that does not waste memory (with free space at the end of the
buffer) when the string is large enough.

DeNA/redis,DeNA/redis,DeNA/redis