Fixed bug where callback could be called multiple times.

Change-Id: I3c13da388df3d1000ab1e44fab68944733257082
Reviewed-on: http://review.couchbase.org/28702
Tested-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Brett Lawson <brett19@gmail.com>