WIP: Caching incoming channel-logs from tap
Fix some ordering issues with the new channel-log caching
Merge branch 'master' into faster_changes

Conflicts:
	src/github.com/couchbaselabs/sync_gateway/db/database.go
Merge branch 'master' into faster_changes

* master:
  Moved memcached stats into the memcached package
  Track ingress/egress couchbase bandwidth
Merge branch 'master' into faster_changes
Fixed a bug decoding a channel-log when appending to an earlier log
Added “Bucket” log key to log all bucket API calls
Added a simple cache of recent revisions to reduce the number of Gets
Fixed authorization problems with the new revision cache

The revision cache now stores the channel access of the revision.
db.GetRev now checks the access privs of a user getting a cached
revision.
Guard against a panic in TruncateEncodedChangeLog

Fixes #243