Send a document
Send a document: a draft is finalized first, as `finalizeDocument` would, then each rail of the plan is tried until one delivers — Peppol, falling back to the email when it refuses or fails; `rail` starts the plan there (`email`), or names `download` alone. Each attempt is one row, recorded before its rail is asked; a refused or failed delivery is an answer (200), the document then `ready` to be sent again. Judged before anything is written, so a draft nobody can receive is never numbered: Peppol for a quote is 422 `rail_not_for_kind`, no rail at all 422 `no_recipient`; finalize's own refusals as `finalizeDocument` answers them. Idempotent by `sendId`: a replay answers the same send, writing nothing; a send id another document's send holds is 409 `send_id_conflict`. A quote a newer one replaces is 409 `quote_superseded`; a document revised after `expectedRevisionSeq`, 409 `revision_conflict`; nothing written for either. While an attempt of the document is in flight (its rail's answer not yet recorded, as after `send_unsettled`), a new send is 409 `send_in_flight`, its rail never asked: that answer may have reached the customer.