MB-17891: Correct off-by-one error in buf_to_printable_buffer()
MB-17891: Correct off-by-one error in buf_to_printable_buffer()

If buf_to_printable_buffer() is passed a src buf which is larger than
dest buf, it attempts to only process as many bytes as will fit in the
destination. However there is an off-by-one error when writing the
trailing \0 which causes it to overwrite the end of the destination
buffer.

Change-Id: I93265b26b987fa9dcd05763725e521276b6018a5
Reviewed-on: http://review.couchbase.org/59390
Reviewed-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
Tested-by: buildbot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>

owendCB/memcached,daverigby/memcached,daverigby/kv_engine,couchbase/memcached,daverigby/memcached,owendCB/memcached,daverigby/kv_engine,couchbase/memcached,daverigby/kv_engine,daverigby/memcached,daverigby/memcached,daverigby/kv_engine,owendCB/memcached,couchbase/memcached,couchbase/memcached,owendCB/memcached