Update couchdb to 1.4.0.

CouchDB 1.4.0
* We now support Erlang/OTP R16B and R16B01; the minimum required
  version is R14B.
* User document role values must now be strings. Other types of values
  will be refused when saving the user document.
* COUCHDB-1684: Support for server-wide changes feed reporting on
  creation, updates and deletion of databases.
* COUCHDB-1139: it's possible to apply list functions to _all_docs view.
* Automatic loading of CouchDB plugins.
* COUCHDB-1634: Reduce PBKDF2 work factor.
* Allow storing pre-hashed admin passwords via _config API.
* COUCHDB-1772: Prevent invalid JSON output when using all_or_nothing
  _bulk_docs API.
* Add a configurable whitelist of user document properties.
* COUCHDB-1852: Support Last-Event-ID header in EventSource changes
  feeds.
* Much improved documentation, including an expanded description of
  validate_doc_update functions and a description of how CouchDB handles
  JSON number values.
* COUCHDB-1632: Ignore epilogues in multipart/related MIME attachments.
* Split up replicator_db tests into multiple independent tests.

CouchDB 1.3.1
* Tolerate missing source and target fields in _replicator docs (COUCHDB-1788).
* Don't log about missing .compact files.
* Fix bug in WARN level logging from 1.3.0 (COUCHDB-1794).
* Fix the -S option to couchjs to increase memory limits (COUCHDB-1792).
* Improve documentation: better structure, improve language, less duplication.
* Improvements to test suite and VPATH build system.