Add SSL support to CouchDB.
Add SSL support to CouchDB.

To enable SSL you need to do three things;

1) enable the httpsd daemon in local.ini (you can just uncomment the line).
2) supply your PEM-encoded cert and key files in the [ssl] section.
3) start CouchDB.

CouchDB will now, in addition to handling HTTP on port 5984, accept SSL connections on port 6984.

The patch itself adds SSL support by updating the local version of Mochiweb to the latest. The upstream release includes our local tweak to support large numbers and to handle Accept-Encoding headers. Our local Mochiweb fork changed the default idle timeout from 10 seconds to 5 minutes, and it was agreed on #irc to revert this change.

The only tweaks to Mochiweb were in mochiweb.app.src (to record the git commit I built from) and the removal of Makefile (replaced by Makefile.am).

Futon received many tweaks as we have 'http://' hardcoded all over. All such instances now use window.location.protocol + '//'.

CouchDB received a tweak to use the right scheme in couch_httpd:absolute_uri (it now gets it from the Mochireq and not mochiweb_socket_server).

git-svn-id: c1f8a8ec0b3bb2e99ab3413722f81f687760e79c@979368 13f79535-47bb-0310-9956-ffa450edef68

fkaempfer/couchdb,ngpestelos/couchdb-couch,alanning/couchdb-couch,cloudant/couchdb-couch,fkaempfer/couchdb,KlausTrainer/couchdb-couch,smithsz/couchdb-couch,alanning/couchdb-couch,alanning/couchdb-couch,fkaempfer/couchdb,apache/couchdb-couch,cloudant/couchdb-couch,ngpestelos/couchdb-couch,fkaempfer/couchdb,cloudant/couchdb-couch,fkaempfer/couchdb,KlausTrainer/couchdb-couch,ngpestelos/couchdb-couch,apache/couchdb-couch,apache/couchdb-couch,KlausTrainer/couchdb-couch,smithsz/couchdb-couch,fkaempfer/couchdb,smithsz/couchdb-couch