code: function decodeDoc(doc) {
    if (!doc) {
      return doc;
    }
    var idx = doc._doc_id_rev.lastIndexOf(':');
    doc._id = doc._doc_id_rev.substring(0, idx - 1);
    doc._rev = doc._doc_id_rev.substring(idx + 1);
    delete doc._doc_id_rev;
    return doc;
  }
docs: read the doc back out from the database. we don't store the _id or _rev because we already have _doc_id_rev.