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>
MB-8145: support of read-only user

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