function setActorId(doc, actorId) {
  checkActorId(actorId)
  const state = Object.assign({}, doc[STATE], {actorId})
  return updateRootObject(doc, {}, state)
}
Sets the Automerge actor ID on the document object `doc`, returning a
document object with updated metadata.