ART: Refactor ImageSpace loading

Make the code more straightforward so it is easier to reason
about and extend.

Also change return types to unique pointers so it's clear that
it is the caller's responsibility to free those when necessary.

Bug: 30832951
Test: m test-art-host
Test: device booting
Change-Id: I3216eb702e45357a48af5158dacbe40e79bd1ae9
6 files changed