Bubble missing_stub errors

If we try and replicate a doc with attachment stubs to a node that
doesn't have a previous revision of that doc then we should return a
missing_stub error instead of dying with a function_clause error.

BugzId: 15562