backported fixes for 0.11.x to 0.10.x

git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/0.10.x@932777 13f79535-47bb-0310-9956-ffa450edef68
3 files changed