Add a buildImageResult helper to avoid duplicating the code
Add a buildImageResult helper to avoid duplicating the code

There were now two exactly same copies of the code to build an ImageResult,
so share them.

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

kubernetes-incubator/ocid,mikebrow/cri-o,nalind/cri-o,mikebrow/cri-o,kubernetes-incubator/cri-o,mikebrow/cri-o,kubernetes-incubator/cri-o,kubernetes-incubator/cri-o,nalind/cri-o,nalind/cri-o,kubernetes-incubator/cri-o,kubernetes-incubator/ocid,kubernetes-incubator/ocid,mikebrow/cri-o