Use posix_fallocate to allocate blocks for ota preallocation

posix_fallocate ensures that blocks are allocated for desired file
size.

resize_file will not allocate blocks on systems that supports
sparse files. This makes resize_file unsuitable for preallocating
space.

posix_fallocate will not shrink larger files to requested size, so
use both resize_file and posix_fallocate.

Bug: 344641261
Test: Schedule ota update that includes mainline update. Verify
    that block count is not zero for temporary file before rebooting.
    adb shell stat /data/apex/ota_reserved/full.tmp
    atest ApexTestCases
Change-Id: Ic2d6845629b0c6d5d64e032083ff5f787e50fd84
2 files changed