Add an optional size param to ApexFile::Open()

This can be used to open an apex file when it is not properly sized. For
example, it can be useful when apexd runs in guest OS and apexes are
passed as block-devices to share with the host OS. In such a case,
we need its actual size so that libziparchive's OpenArchiveFdRange can
open it without relying on the (possibly wrong) file size.

Ignore-AOSP-First: to avoid merging into S

Bug: 184605708
Test: ApexTestCases
Merged-In: I750ac16ad95c35963f1f93e202aa288d42f42eba
Change-Id: I750ac16ad95c35963f1f93e202aa288d42f42eba
(cherry picked from commit 23ce51d06769870f417975fcab580bdbf0bb5a9b)
3 files changed