Upload the manifest before creating a signature
Upload the manifest before creating a signature

This will allow us to try several manifest formats before signing the
one acceptable by the destination.

This is a minor behavior change, however the user was previously waiting
for upload of hundreds of megabytes of layer data, so upload of the
small manifest should not be very noticeable.

What _may_ be noticeable is that before, if the signing failed, the
manifest tag in the destination was not modified; now the tag is pointed
to the new manifest, but the manifest has no signatures.  (Individual
transports could still batch both operations and actually upload
atomically in .Commit(), but the docker:// destinations we care about
for manifest format autodetection don’t work that way; sadly we have no
option but to really upload the manifest.)

Signed-off-by: Miloslav Trmač <9c008e38982a5397deb855345fb164f0558459ae@redhat.com>

containers/image,masters-of-cats/image,containers/image