Exposed REST error code from C++ binding.

REST errors no longer use a literal, but instead an error
code from the error codes enumeration.

Change-Id: If5500353b142e39e59ee9b296ba23afe84b334f8
Reviewed-on: http://review.couchbase.org/30192
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
Refactored Javascript Code and Documentation.

Change-Id: I0fe52bb1e9442843baecf17c0316f2e0323c6960
Reviewed-on: http://review.couchbase.org/30195
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Brett Lawson <brett19@gmail.com>
Release 1.1.1

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