dex2oat: Move where we report end of compilation.

- Merge CompileApp and CompileImage which shared most of the logic.
- Add a scoped reporting class to report start and end of compilation.
- Dup the fds in the reporting, to not be subject to dex2oat
  refactorings.

Bug: 134558686
Test: test.py
Change-Id: I5db4b3fcb897b04aab325e7fe006e289d6f6b87d
1 file changed