Restore uniqueness of timestamps

Robert Newson is not to be trusted.
Don't upgrade admin hashes into the _users database

Admin users are stored in .ini files and are not full-fledged user
documents. Internally, a fake document is made to allow insertion into
the auth cache. CouchDB 1.6 introduced a feature to upgrade password
hashes from the legacy simple hash scheme to the stronger PBKDF2
scheme. It inappropriately attempted to do this to the fake admin
docs, which do not pass the _design/_auth validation checks. This is
fortunate, however, as CouchDB would then have written the admin users
into the users database causing widespread confusion and fear.
Follow symlinks for space check

Follow symlinks when the compaction daemon checks for available space.

closes COUCHDB-1592
Reset to default if max_dbs_open is deleted

max_dbs_opens is present in the stock default.ini so it appears we've
never deleted the value so far, just changed it up or down (mostly up
;))

When this property is deleted, reset to the default value.
Ignore all casts, not just foo
Add couch_event dependency
Send 400 bad request rather than 500 for invalid base64 in auth header

Along with a useful error message.
Export parse_copy_destination_header/1
Update all view/search index shards on ddoc update

This update is part of the fix to trigger view/search index updates for
all shards when a ddoc is updated. In the past, we only triggered
indexing jobs for shards which contained the ddoc. Other parts of the
fix are in ken and fabric. This particular commit contains the
following:

- A new couch_db_update event, which will be used in ken to spawn
  indexing jobs.

- A new function clause for the local _changes feed couch_db_update
  handler. This function clause will cause the _changes feed handler to
  ignore the aforementioned new couch_db_update event.

BugzID: 10979
Switch notifications to the new couch_event app
Update couch_auth_cache to use new couch_event app
Update couch_changes to use new couch_event app
Remove old couch_db_update_notifier code
Add uuid and epochs to couchdb database header

All .couch files now have a uuid value that is preserved during
compaction. This value can be used to distinguish one .couch file from
another. In addition, a list of {node(), non_neg_integer()} tuples is
recorded showing the highest update sequence used since the last time
that the value of node() changed. This allows us to know if the
database file has moved and received writes since the last time we saw it.

BugzID: 19133

Conflicts:
	include/couch_db.hrl
	src/couch_db.erl
	src/couch_db_updater.erl
Remove ets table scan on process exit

This commit adds a new ets table for doing O(1) pid-to-db-name lookup.
This is to remove the necessity for doing an ets table scan on the exit
of a monitored process.

BugzID: 19132
Add backwards compatible key_group_level option

This adds a new btree reduce fold option called `key_group_level` that
can have the value `exact`, `0`, or `N` where `N` is any positive
integer. The reason for adding this is so that calling code can pass a
group level option instead of a function for key grouping. The important
point is that the new option uses the btree's defined `less` operator to
test equality which means that ICU collation is used for key grouping on
most views.

BugzId: 19776
Add config for couch_server LRU updates on read

This commit adds the ability for couch_server to ignore update_lru
messages. This should reduce load on couch_server when few entries are
being expired.
Use a #proc_int record internally instead of #proc

This allows us to add more information to an OS process without
disturbing the proc manager API.

BugzID: 19529

Slightly modified to include #proc{} and #proc_int{} handling in return_proc.
Allow graceful reloading of OS processes

This patch adds a reload/0 command to couch_proc_manager that will cause
all OS processes to be reclaimed at the next earliest convenience (i.e.,
when the current client is done with the process).  It also adds a
get_stale_proc_count/0 function to report the number of processes that
have yet to be reclaimied.

BugzID: 19529
Fix typo in pattern match