MB-10355: Fix issues with incorrectly setting the datatype

There were two issue here. One was that we weren't properly setting
the data type when processing an incoming tap mutation. The second
was that the buffer for meta data used when persisting items was not
zeroed out. Since the extra meta length can be zero this caused the
last byte to contain garbage. When we ended up reading this value
it caused errors with the datatype field.

Change-Id: I5162bf51c4021ac30359e3cee12184a698179201
Reviewed-on: http://review.couchbase.org/34166
Reviewed-by: abhinav dangeti <abhinav@couchbase.com>
Tested-by: abhinav dangeti <abhinav@couchbase.com>
Aquire and release a reference for all upr connections

If we want to be able to notify upr connections when they are
paused then we need to reserve the connection in memcached.

Change-Id: I4ae6097cf211b7c55f3fa8aef92eaa1f9ba8ab14
Refactor ConnNotifier

Change-Id: Ibb59b6d5e3f136400422d6ac2bf92ecd188ebf67
Refactor tapconnmap

Change-Id: I0a04982c1dd608397adb219c954d1994b9b3592d
Refactor ConnectionReaperCallback

Change-Id: Id10c64ac78013ae66690325b93e6dc0d157bd34e
Add Notifiable class

Change-Id: I1c8a9c19084e6d72b9710d048886f2d2243bac78
Close a stream if the vbucket state changes

This change is needed for two reasons. The first is that upr
consumers should get a notification that a stream is closed if
the state of the vbucket changes. The second is that since a
vbucket might be accessed by a stream during shutdown we need
to notify the upr connection that the vbucket is no longer
valid so that the stream can be closed. Otherwise we might
access invalid objects.

Change-Id: I1ef72b7488976a058af001afb085a73cd484edc7
Add producer pausing

Change-Id: I68f6cbd098ad3ed26ef2024ae2af7c032325da64
Add consumer pausing

Change-Id: I122faa8621b340dbc4e8708c65b09aea40989e9f
Comment out vbucket notification

Change-Id: I9f9648c4120cd84702941997059011c14171ba69
WIP

Change-Id: Ic2c20529711021a4ea19cc6a9a772c871beb7ca7