MB-11305 Fix dead assignments

As identified by Clang static analyzer; fix instances of dead
assignments - either remove the assignment where it's not needed, or
actually check return values we were previously ignoring.

Change-Id: I71848c43a126e0fab736ca2a804a9fb51ac5cf03
Reviewed-on: http://review.couchbase.org/37961
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>