PYCBC-267: [twisted] Unset lcb_active _before_ the event fires

Otherwise we might not end up delivering events when the event is
re-activated from within the handler.

Change-Id: I8df3925c683de7d90192cd0c24c68d957915298a
Reviewed-on: http://review.couchbase.org/40939
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Adapt internal code to lcb 2.4

This changes the internals of the code to be more streamlined towards
libcouchbase 2.4. This in itself does not change any public APIs.

Change-Id: Icaa8560e3c3f9f66e0829cc33491a6debbaf5ce9
Use new connection string for constructor

This removes the classical 'bucket', 'host', 'port', etc. options in
favor of the new standardized connection string.

Change-Id: Ia98084f03834b27ab5033f427b18c2e48a6ccaf6
Don't try to destroy instance on async connection if non exists

Change-Id: Ic962fa0e913062b47fe9e9926df6eabe7949c029
Use lcb_destroy_async for asynchronous destruction

Change-Id: I733b78a9fae837a5ae0bb7926ff2f28828214bac
Rename internal pycbc_Connection to pycbc_Bucket

Change-Id: Ib58214cc68f52d8eeed26127306cd2aa5148da4b
Move lcb_version() to module level

This is not a bucket-level property

Change-Id: I71ce20a5cb1ff4f81188addd90c71feae4bd502b
Rename Connection to Bucket

Note that there are still likely lots of doc references pointing to the
older name. This commit also includes a dummy subclass of Bucket called
Connection so that existing code will not break.

Change-Id: I22dc8564d9d009567a7e940c4e981a82372f6c6c
Add BucketManager class

This moves the design document manipulation functions into the
BucketManager class, which is now obtained via the new bucket_manager()
method in the Bucket class. This breaks API with older versions

Change-Id: I3947fc0fa672d1eeeaf26b3c21addb0935bb9eef
Remove __getitem__/__setitem__ accessors

These are oversimplified and undocumented

Change-Id: Idbea320c9ea601a8a26ef0fa6d657cd748b3ebfd
Rename incr/decr to counter

This is a breaking change. Docs still need to be updated accordingly

Change-Id: Iedd6733ff77c0bbf05a9c363cd0e53a0004dc5b6
Rename set, add, delete for 2.0 API

Change-Id: I106e19a26b91fe2f25b7036e33f79f5e5884c037
Use DurabilityConstraints object rather than persist_to/replicate_to

This allows for more flexible ways to specifiy this setting in
production without increasing line noise for other parameter types.

Change-Id: Id1330f30b060bc58d9941a7c02f73ff329c8eadc
Fix txcouchbase test (uri fixup)

Change-Id: I4060fff22c5941f46d656ed8f7a241872b0e7d77
Refactor basic KV api for lcb3 API

This makes the code smaller and clearer to read. WIP since we still need
to change the callback interfaces as well.

Change-Id: Ie8f6fcc1f2f922833db17a348bd12ad820ae9824
Refactor KV callbacks to use lcb3 API

Change-Id: I0519dd0565665cc0520cf03663a079e105e64e58