MB-7306 Fix to the memory leak in lookup_callback()

Change-Id: Id7d73a09c55d965405aae4d50ce2f9d63057e3ba
Reviewed-on: http://review.couchbase.org/22966
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Jin Lim <jin@couchbase.com>
Reviewed-by: Aaron Miller <apage43@ninjawhale.com>
MB-7297 Use size_t for python wrapping for 32-bit support

The couchstore/couch_db.h uses size_t for several struct fields, and
size_t can be either 32-bits or 64-bits, depending on platform.
So, instead of c_ulonglong, use c_size_t for those fields.

Here, we assume sizeof(off_t) == sizeof(size_t). Not a 100%
bulletproof assumption, but it seems to work on tests.

Additionally, use uint64_t for the couchstore_open_db() flags
parameter rather than the platform-specific int.

Change-Id: I36898d0260d44d57fe16ff7e16c7759c4686b4e4
Reviewed-on: http://review.couchbase.org/22969
Tested-by: Steve Yen <steve.yen@gmail.com>
Reviewed-by: Aaron Miller <apage43@ninjawhale.com>
Tested-by: Aaron Miller <apage43@ninjawhale.com>
MB-100: use optimized 64-bit byteswap code on GNU/Linux

glibc does not have htonll but it does have bswap_64 as well as bsd's
htobe64. bswap_64 is more than good enough.

Change-Id: Iab325a0a5872d3a9379dac565ea177fe4bf6d9cb
Reviewed-on: http://review.couchbase.org/21493
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aaron Miller <apage43@ninjawhale.com>
Reviewed-by: Damien Katz <damien@couchbase.com>
Reviewed-by: Aaron Miller <apage43@ninjawhale.com>
Merge tag '2.0.0' into master

2.0.0

* tag '2.0.0':
  MB-7297 Use size_t for python wrapping for 32-bit support
  MB-7306 Fix to the memory leak in lookup_callback()

Change-Id: I97cacb5970f7f7ac3bacaf05394b987697fd79c3
MB-7502 Fix inner node callbacks for walk API

I accidentally killed this code in a merge, and it broke
couch_dbdump's --tree option.

Change-Id: I549bd8d4ee141775b5a821889a68bfe66092867e
Reviewed-on: http://review.couchbase.org/23769
Reviewed-by: Fulu Li <fulu@couchbase.com>
Tested-by: Fulu Li <fulu@couchbase.com>
CBD-720 Add deletion dropping mode to compactor

Change-Id: If20f7477276dddf197663886f3325e5164a9dc59
Reviewed-on: http://review.couchbase.org/23836
Reviewed-by: Damien Katz <damien@couchbase.com>
Reviewed-by: Fulu Li <fulu@couchbase.com>
Tested-by: Fulu Li <fulu@couchbase.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>