Use `os:timestamp/0 instead of `erlang:now/0`

We don't need the guarantees of `erlang:now/0` in `make_cookie_time/0`,
so `os:timestamp/0` is just fine.
Remove unused variable and function call

Finally get rid of that compiler warning.
Send a real EventSource event for heartbeat

The EventSource connection can get stuck (in TCP half-open state*) and there's no way
for the client to detect that. This commit changes the way heartbeat is sent, instead of
sending a newline character, it sends an empty event of type heartbeat:

    event: heartbeat
    data:

This event doesn't have an id: field, so the client will retain its latest Last-Event-ID state.

This doesn't change the expectations of clients that used EventSource till now, because they
subscribe to the 'message' event type. To get the 'heartbeat' events a client will need to
explicitly subscribe to it:

    source.addEventListener('heartbeat', function () { /* cancel a timer that would otherwise reconnect the source */ });

* this can happen when you suspend your laptop, on flaky internet connection, ADSL reconnect,
bad wifi signals, bad routers etc. Pretty often in a typical internet usage nowadays.
Fauxton: fix loading of pouch

Added a red test which turned green
Support `fail_if_no_peer_cert` ssl option
Rephrase part of the replicator documentation

This tries to make the replicator documentation's "Delegations" section
more clear and easier to read.
Fauxton: reformat code & remove whitespace
Fauxton: refactor ActiveTasks

- do not use a model as a collection, directly operate on the
  collection which gets filtered for the view
- remove the view which acted as layer to fetch collections from
  the model and passed it to a view
- remove not used html-template
- format code
Fauxton: do not load unnessecary d3 & backbone
Fauxton: Hide preview functionality until we improve it
Fauxton: Do not add empty filters

Do not add filters, when someone submits the form and did not
enter anything
Fauxton: encode uri component for config url

Fixes the "/" in httpd_global_handlers in the config dashboard
Fauxton: Fix QueryParams

Ensure we clone the parameters to Documents.QueryParams.parse and
Documents.QueryParams.stringify. These functions should return new data
structures rather than modifying the input in-place.

Do not use the parsed query object for url generation. Instead, use the
stringified representation. Fixes COUCHDB-2249.
Fauxton: Query Parse url
Fauxton: Fix Id added to edit doc view

When updating a document, after the save a "id" field is incorrectly
added. This patch fixes that.
Use "single-master" technical term which inspired by RFC 3384

COUCHDB-2248
Fauxton: remove the Log Component

As prepration for the BigCouch merge and a LTS Couch 1.x with
Fauxton. After the merge the _logs resource will not be available
and logging happens with Lager. See
http://www.mail-archive.com/dev@couchdb.apache.org/msg32934.html
for more details.
Fauxtin: Remove Todo, clean up readme

We haven't used todo.md in a long time. All the tickets are in JIRA.
I've just removed some old wording from the readme.md
Fauxton: add missing closing tags
Fauxton: Inject database into view

it's handled in the options and used, but was never passed