factor out backends

Extracted dedicated backends for docker/non-docker staging logic, so
that all shared code can live in inbox & outbox, and to reduce the
number of components that need to be changed when new backends are
added.

[#80870924]

Signed-off-by: Matthew Sykes <matthew.sykes@gmail.com>