testutil: Common callback handling

Change-Id: I164a05aff4e8239be8c301b14648307648cf0634
Reviewed-on: http://review.couchbase.org/29685
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reset SASL info when failing out the server

Otheriwse, SASL is never retried on the next attempt

Change-Id: I9176aae87b922335f7190cf451b2cb6c28a55810
Reviewed-on: http://review.couchbase.org/29686
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>