trim for all serialized values

Change-Id: Id36397dc8ecd16e10e3ad169de8e3932d40a058c
Reviewed-on: http://review.couchbase.org/28013
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>