Fixes #812, #778, #573.
As we have not been able to track down the race condition in #812, this PR
defensively programs around a possible race condition in building Docker images.
The `runImageBuild` method ensures that the image in the store is the one built.
When pushing an image, we extract the digest pushed from the push output, and
store that as the expected repo digest. And when in obtaining the repoDigest, we
ensure the image name of the reference matches the image name input (sans tag),
warning on a difference with the expected value.
If for any reason the image fails to build, update the Docker Engine's image
store, push, or we detect inconsistency, we warn with a persistent (not
ephemeral) message to help root cause the issue.
In a follow-up, we may consider removing the call to get the repo digest and
rely on the Push to report the digest, though it's unclear if we should expect
the aux message to be reliable.