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.
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