MB-39668: Don't throw exception from Cookie::toJSON
MB-39668: Don't throw exception from Cookie::toJSON

Cookie::toJSON is called from the exception handler
for connections, and if an exception (!= std::bad_alloc)
is thrown it'll tear down the process.

Change-Id: Ia0617d3c16289431acb8084c1375c4a9b5f4affa
Reviewed-on: http://review.couchbase.org/c/kv_engine/+/129587
Reviewed-by: Paolo Cocchi <9dd88c9f3e5cbab6e19a6c020f107e0c648ac956@couchbase.com>
Tested-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@couchbase.com>

daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine