Fail dex2oat when generating app image without boot image.

When the boot image is unavailable, an app image or a boot image
extension cannot be generated. Before this change, dex2oat crashes at
`CHECK_NE(image_begin, 0U)` in `ImageWriter`. After this change, dex2oat
returns early with a user friendly error message.

Bug: 211973309
Bug: 215665835
Test: atest art_standalone_dex2oat_tests
Change-Id: Ic6ca2cdade08b8f7c7ae4d06fc52aedafd71beab
2 files changed