Fix dialyzer warnings

Change-Id: I440acf09dc913f3b56b68f7ce3ce4077fda07da2
Reviewed-on: http://review.couchbase.org/29409
Reviewed-by: Filipe David Borba Manana <fdmanana@gmail.com>
Tested-by: Volker Mische <volker.mische@gmail.com>