Allow building a source image from another image
Allow building a source image from another image

Factor out logic that fakes up a source image using a container to be
able to do so using either a container or an image, by passing in names
and the starting layer ID directly, and by making the addition of a
history element for the layer optional (true for a container, since it's
going to add a new layer, false for an image that we're just exporting).

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>

Closes: #141
Approved by: rhatdan

projectatomic/buildah,nalind/buildah-1,rhatdan/buildah,nalind/buildah-1,projectatomic/buildah,TomSweeneyRedHat/buildah,TomSweeneyRedHat/buildah,rhatdan/buildah,TomSweeneyRedHat/buildah,ipbabble/buildah,projectatomic/buildah,ipbabble/buildah,nalind/buildah,nalind/buildah,rhatdan/buildah,nalind/buildah-1