Rewrite the underlying C++ implementation

This provides a more maintainable and performant layer for Couchnode to
interface with V8. It also provides well structured classes to allow for
better handling and/or rescheduling of commands.

Much of the work here was previously done in javascript itself, with our
own arguments being positional, but such code was difficult to maintain
and extend.

TBD are docs for the new internal API

Change-Id: If60c6ee86bae5ca05be8370336ef45935ce2b00b
Reviewed-on: http://review.couchbase.org/28593
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Allow specifying --couchbase-root

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

Change-Id: I63e3d5edeed3874697b5d4a230e5542ae515a1d7
Reviewed-on: http://review.couchbase.org/28614
Reviewed-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Define constants with NODE_DEFINE_CONSTANT

Change-Id: I9f3a5220de19c05836be578a7a146bb5b3379df7
Reviewed-on: http://review.couchbase.org/28616
Reviewed-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Schedule less operations for jscbc-14 tests

LCB is somewhat broken and 6k ops is plenty

Change-Id: I892de7aa95716b8954d2d4ffe986d0c7dd2ea980
Reviewed-on: http://review.couchbase.org/28617
Reviewed-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Add extended value formatting options

Change-Id: I7bb0e2cf408ff4fa9d23aee148b6f17fcdae9789
Reviewed-on: http://review.couchbase.org/28618
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
runtests from tests directory

Change-Id: I97d8f1290e8f0ee100554f6a0370040919c407e7
Reviewed-on: http://review.couchbase.org/28619
Reviewed-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
API Documentation Fixups

Document all public methods. Reflect newer changes in API

Change-Id: Iecadf4360a73150643a13962098f4f436b5d044c
Reviewed-on: http://review.couchbase.org/28620
Reviewed-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
View-query and pagination interface.

lib/couchbase.js:
  - Importing query.js module.
  - _init() callback to query module.
  - view() API does not take a callback and returns a Query() instance. We
    expect users to do,
        var q = cb.view("designdoc", "myview", queryparams)
        q.query(callback);

lib/http.js:
  - moved parameter validation under view() API to query.js, since we need to
    validate query parameters at several places.
  - view() API just returns the Query() instance.

lib/query.js:
  - implements the following query API.
      q.query(queryparams, callback)
      q.clone(queryparams)
      q.firspage(queryparams, callback)

  - implements the following paginator API.
      q.isNext()
      q.next(callback)
      q.prev(callback)

Added test cases for query in 08-query.js
Added test cases for pagination in 08-page.js
Updated test cases for 08-view.js

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

This goes in conjunction with a different patch to LCB to support the
same

Change-Id: Ic23e878da5826a9d723339128d204b27e50e5a96
Reviewed-on: http://review.couchbase.org/28621
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Call error callback on connection failure

Change-Id: I9eb82a6075c202a5d1100648a5e0cecd974d43aa
Reviewed-on: http://review.couchbase.org/28634
Reviewed-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Added devDependancies for missing modules needed to run tests.

Change-Id: I25a3c03ea975a2bdca2add4b058049c38898606a
Reviewed-on: http://review.couchbase.org/28648
Tested-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Update contrib notes to point to Brett

Change-Id: I0657aa4aca60765874ed9c26fed31e6b0016649d
Reviewed-on: http://review.couchbase.org/28678
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>
Don't use -rpath on OS X

Change-Id: If144b6ad41a6c97a32121d3407e203ed3ddd9666
Reviewed-on: http://review.couchbase.org/28652
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Brett Lawson <brett19@gmail.com>
Updated configuration values on Connection instances to be true properties.

Change-Id: I13a13b50d14574b43ec97337f7b4c5098963030c
Reviewed-on: http://review.couchbase.org/28649
Tested-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Renamed delete to remove and removed alias due to it being a reserved word.

Change-Id: Ib7f9cdd893bb6af3910f56869b19a459b92116dc
Reviewed-on: http://review.couchbase.org/28650
Tested-by: Brett Lawson <brett19@gmail.com>
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Cleaned up view api and documentation.

Change-Id: I282a32e67215cd4e3f7c77352018b6fe442d48f4
Reviewed-on: http://review.couchbase.org/28651
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>
Added check to ensure compatible libcouchbase version is being used.

Change-Id: Iee59604c6a5bc0f8d8a0ed7be0364e4a0a8b5ed6
Reviewed-on: http://review.couchbase.org/28697
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Brett Lawson <brett19@gmail.com>
fixup build warnings under clang on osx

Change-Id: I2fe9b5303cc89e0477ea667e3e3a9d6dd7509673
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>