Add nullptr and size check for opening a mem mapped dex file.

The bug has an apk with 0 size classes.dex. When dex2oat tries to open
the file for layout, it crashes. This adds checks to ensure that the mem
map isn't null and has a sane size before opening it as a dex file.

Bug: 35892406
Test: mm test-art-host
Change-Id: I5f6b5a1e7bbccf4fe3483b68023d51436eb71805
3 files changed