Twisted support

This adds twisted support using the following:

* New private 'async' module which returns future-like objects rather than
  waiting

* IOPS implementation for a twisted reactor

* txcouchbase package supplying a connection wrapping the internal Async
  object

Test enhancements were needed to make sure the test architecture was
usable with Twisted's trial.

Change-Id: I58a94944f6fbf308b307db532bd01d6cf6b9fc05
Reviewed-on: http://review.couchbase.org/29418
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Properly retrieve meta when there are no rows

Change-Id: Ifaf1c5a90eed1a4de3fc07405125727c57d4fe8a
Reviewed-on: http://review.couchbase.org/29424
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
HTTP Improvements:

Make http result callbacks rate limited

http.c fixups

Only extract http meta if data is dict

Change-Id: I599badc8bbd8e00638f9fdab1e3c41e8a937b256
Reviewed-on: http://review.couchbase.org/29574
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Don't unlock GIL if destroyed (callbacks.c)

Change-Id: I79294d185483f0fdd27aa6fae63029b05d096b28
Reviewed-on: http://review.couchbase.org/29419
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Twisted examples

Change-Id: I082118123e63a4a4d3091f54a4670731ffacf847
Reviewed-on: http://review.couchbase.org/29557
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Test Fixups:

- Delete keys before incrementing them (test_itertypes)

- tests.base: Fixup whitespace between class definitions

- Don't import nose.exc in tests:
  Py 2.7 has 'unittest.case.SkipTest'. Import that first and fallback to
  nose.exc.SkipTest

Change-Id: Ibc90cdd2f882831047b0b935bbd013e175a4a8d3
Reviewed-on: http://review.couchbase.org/29573
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Async/Tx view interface

Change-Id: Ied7aaca4aa6c2adb0f931f698ad034031ade7e8c
Reviewed-on: http://review.couchbase.org/29427
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Very very basic PyPy support

This commit adds some basic changes to the extension to allow basic
usage and compilation with PyPy. The pypy support is *STILL BUGGY* and
should not be used in production environments. However basic operations
seem to be working. Tests however, seem to still fail.

Change-Id: I17560cc49bc89dd18d46d03f3c6614b3e4e97a49
Reviewed-on: http://review.couchbase.org/29428
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Documentation for async interface

Change-Id: I940ac2765092e5e6918dcd7ed96195c84ef0e845
Reviewed-on: http://review.couchbase.org/29430
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Fix test_dupkey setUp

Change-Id: Idc9c7fd05ed2f278be2b7e82b12261b05ae4dd4b
Reviewed-on: http://review.couchbase.org/29431
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Document txcouchbase

Change-Id: I611036b67e749c5046741a04c25849732ac42ad4
Reviewed-on: http://review.couchbase.org/29433
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Move tests as subpackages

This will allow the tests to be used by future implementations of the
API which may be distributed as different packages. It's also cleaner as
it will not conflict with any other top-level 'tests' namespace.

Change-Id: Idb30c851bdae314d0d193e13e217f954977062ac
Reviewed-on: http://review.couchbase.org/29435
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Gevent support (NG)

This provides higher performance gevent support than what's available in
1.1.0

Change-Id: Id2ead0a4e9b441ad546eb087370357ef6d50c281
Reviewed-on: http://review.couchbase.org/29436
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
API Wrapping helpers for base Connection

This adds some private utilities to better help subclasses wrap methods.

Change-Id: I94abe9b97735238dbcefa1ba6c7f4a74b23a071c
Reviewed-on: http://review.couchbase.org/29558
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
txcouchbase: apiwrap

Change-Id: I53796acae6e76dbe3ace915ff22ba0680bc0ec82
Reviewed-on: http://review.couchbase.org/29440
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Wrap endure for async

Change-Id: I471b83024a286d49a9e7f0ddd80c8a42996878a4
Reviewed-on: http://review.couchbase.org/29560
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
async.views: Allow for overriding no include_docs

Change-Id: If0c233344fa76ece8b372549b040844d5cced498
Reviewed-on: http://review.couchbase.org/29561
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
test_get: Use assertIsInstance to check for subclassing

Change-Id: Iac9952096677c58fcda2c6d42956e098fa2f199b
Reviewed-on: http://review.couchbase.org/29562
Reviewed-by: Mark Nunberg <mnunberg@haskalah.org>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Allow default Connection test class to be overidden

Change-Id: I5d1b85f7cb0104f81a965a6d70d7f36f02425d65
Reviewed-on: http://review.couchbase.org/29563
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Declare Connection_lcb_version as being METH_NOARGS

Change-Id: I408efab697eee9cf327e0e70e5238508549038cc
Reviewed-on: http://review.couchbase.org/29566
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Volker Mische <volker.mische@gmail.com>