NCBC-261: Use an enumeration instead of integers for return codes

Change-Id: Ib266358590be4dc25ca33b065aa9fc649fe9d18a
Reviewed-on: http://review.couchbase.org/34125
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Jeffry Morris <jeffrymorris@gmail.com>