Move attachment code into couch_att

This is an attempt to isolate the attachment record and
some related code. This will allow seamless upgrades
over time.
Call set_io_priority/2 before fetching design documents

This change causes nodes that are in maintenance mode to drop view
requests earlier than they would otherwise. Without it, calls to
ddoc_cache:open_doc/3 are being made on nodes that are in maintenance
mode, with what appears to be undesirable results.

BugzID: 27483
Merge pull request #142 from cloudant/27483-check-io-priority-earlier

Call set_io_priority/2 before fetching design documents
Fix fabric_db_update_listener code upgrades

Changes procesess waiting idle for db update messages will never upgrade
their code. This just adds a timeout before recursing through the module
exports table to load new code.

BugzId: 27660
Merge pull request #143 from cloudant/27660-fix-db-listener-upgrades

Fix fabric_db_update_listener code upgrades
Merge pull request #134 from cloudant/24518-attachment-metadata

Move attachment code into couch_att
Use couch_view:less_json_ids when comparing view row ids

Fix by @davisp, githubbery by @rnewson.

BugzID: 28181
Merge pull request #147 from cloudant/28181-view-ordering

Use couch_view:less_json_ids when comparing view row ids
Clear worker references for get_shard_replacements

This function relies on record equality. If a request passes workers
that have references defined it would return all copies of the shard
range incorrectly.

BugzId: 28992
Set non-interactive default for set_security

Prior to this commit, fabric:set_security would default to interactive
IO priority. This would cause all nodes to set the security header
except shards on any nodes which were in MM. Subsequent calls to
fabric:get_security would cause inconsistent security properties to be
applied to the request. This patch sets a non-interactive default for
fabric:set_security, which will cause security updates to be applied to
all nodes regardless of MM by default.

BugzID: 28847
Merge pull request #150 from cloudant/28847-set_security-ignore-mm

Set non-interactive default for set_security
Merge pull request #149 from cloudant/28992-fix-get-shard-replacements

Clear worker references for get_shard_replacements
Consistently log fabric worker timeouts

Write a log line for each worker that did not return a response
when a fabric request times out. The format of the log line is:

    fabric_worker_timeout ENDPOINT,NODE,SHARD_NAME

This is intented to be easily consumable by downstream tools
(e.g., Splunk).

BugzID: 26984
Merge pull request #148 from cloudant/26984-log-fabric-timeouts

Consistently log fabric worker timeouts
Support since=now

BugzID: 31725
Merge pull request #152 from cloudant/31725-since-now

Support since=now
Replace calls to margaret with calls to couch_stats

Also add a stats_description.cfg file.

BugzID: 16742
Add meck directives for couch_stats to eunit tests

BugzID: 16742
Merge pull request #144 from cloudant/16742-couch-stats

Replace margaret with couch_stats
Report new data size entries in info blobs

This consolidates all of the file size information under a single key in
the info JSON. The previous entries for disk_size and data_size are left
untouched for backwards compatibility.

BugzId: 27061