ISSUE-18: sync with latest couchdb changes & latest private rcouch release.