Add more tests to test/etap/073-changes.t

Cover deleted changes and built-in filter `_design`.
Fix OAuth validation when using the rewriter.

Patch by Klaus Trainer.

Closes COUCHDB-1321
Avoid confusing log messages when replication completes

When a replication finishes, the replicator manager (database)
will call couch_replicator:cancel_replication/1 with the purpose
of ensuring the child spec is removed from the supervisor.
This function however is used as well when users explicitly ask
to cancel a replication, and logs messages which don't make sense
when invoked by the replication manager (added by COUCHDB-1271).
This change also adds a comment about this behaviour.
Add ddoc_updated event

This is part of the fix for COUCHDB-1309.
Shutdown view group on ddoc update

If a design document is updated (or deleted), its associated
view groups that are open will be shutdown as soon as they
finish serving all their requests. Not doing this prevented
a proper cleanup of outdated view files (file descriptor leaks)
and unncessary processes in the system (old view groups and index
file ref counters, for e.g.).

COUCHDB-1309
Update CHANGES & NEWS to reflect COUCHDB-1309
More efficient communication with the view server

This change makes the communication between the Erlang VM and
an external view server (couchjs for e.g.) more efficient by
writing a series of commands into the port and reading all the
responses from the external view server after doing all those
writes. This minimizes the amount of time each endpoint spends
blocked reading from the port.

COUCHDB-1334
Update CHANGES & NEWS to reflect COUCHDB-1334
Fix database compaction retry after server restart

If we attempt to compact a database which has a .compact file
left from a previous compaction attempt, and the current attempt
is the first one, the server will crash because the task was not
registered before.
Fix replicator doc GET requests for many revisions

Mochiweb limits request lines up to 8192 characters but the
replicator wasn't accounting for the verb and protocol parts
of the first request line ("GET " + " HTTP/1.1\r\n")

Closes COUCHDB-1340.
Add test test/etap/242-replication-many-leaves.t

This test was motivated by COUCHDB-1340. It verifies the
replicator is able to replicate documents with a very
high number of leaf revisions.
Add missing space for style
Update CHANGES & NEWS to reflect COUCHDB-1340
Replicator: encode query string parameter values

According to RFC3986 [1], characters like "[", "]" and "," must
be percent encoded when used in values of query string parameters.
One such query parameter example is ?open_revs whose value is a
JSON array of strings (which always contains "[", "]" and ",").

[1] http://tools.ietf.org/html/rfc3986#section-2.2
Replicator: reduce maximum request line length

COUCHDB-1340
Delete self from THANKS and add to AUTHORS
Remove unused import
Update CHANGES & NEWS to reflect COUCHDB-1288
Add test test/etap/074-doc-update-conflicts.t

Test motivated by COUCHDB-911.
Failing test for duplicates in bulk docs

If a duplicate or worse yet, two different docs with the same id is
contained in a bullk docs save, both are returned as in conflict but
one is actually saved, usually the second one.

jira-911