MB-11572 Use thread-safe RCPtr for stream instances.

Note that SingleThreadedRCPtr is not thread-safe if it is
accessed by more than one thread.

Change-Id: I561812b9cd70b9610fae7329b25baab0c582b9db
Reviewed-on: http://review.couchbase.org/38992
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Reviewed-by: Sundararaman Sridharan <sundar@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
Synchronize UPRProducer::handleResponse API through the lock.

Change-Id: I782d8e0c126a23174d50eb89c628f91d791dbe39
Reviewed-on: http://review.couchbase.org/38995
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>
MB-11601 Check UPR_EXPIRATION message type in freeing item objects

Change-Id: I7cc345a8e7dae5dca6e16840501a81239b3d3805
Reviewed-on: http://review.couchbase.org/39004
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>