Unify I/O error codes

Change-Id: I33479375e08aa5a8c46713932ba5eb5ebaadd27b
Reviewed-on: http://review.couchbase.org/33603
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>