Kevin's fixes to couchbase.js

Change-Id: Ia9f4bc59f9748f83e9f25c9ebf5aa61f8c3ec588