Split _find_and_record_images_to_rebuild
Purpose of this patch is to make this method easier to be reused and
tested. With this patch, any time to test it or call it to find
images that contains RPMs included in a specific Errata advisory, do
not need care about database, and it is clear for caller to know it
just finds images and has no side effect.
As a result, it is named to _find_images_to_rebuild and becomes a
generator to yield found images for each NVR added to advisory, those
images are yielded in proper rebuild order from base image to leaf
image through the dependency build chain.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>