[#1906] Use a ByteBuf allocator from the ByteBufAllocator when encode Strings