Add patchoat check that input oat file has patch section.

Do this check before opening the output file in case this could be
causing the file to become truncated.

Bug: 27723864

(cherry-picked from commit 99503b9805def2ed7d4fe4bf285c6fdd8ddce6ed)

Change-Id: I2134ec65fb6d9582f4eb4c2619a5ffb7b987eaa6
3 files changed