Pass document id & rev rather than the whole document

This uses the ddoc_cache support for revisions. It should
reduce bandwidth overhead of copying documents around.
Handle fabric upgrade

We still need to handle direct document passing for older
clients. The new Id+Rev protocol will be a part of a
future upgrade.