Fix verity on system partitions larger than 2G

If the system partition is larger than 2G, the device fails to read
verity metadata, because fseek accepts only a 32-bit signed offset.
Switch from fseek to lseek64 to allow seeking using a 64-bit offset,
which solves the problem. At the same time, move away from stdio in
the function.

(cherry-pick of 4cafe2ff89b49329e0e880900195d8e061bd3750.)

Bug: 17705619
Change-Id: I226320498dcb750ec6cde84411c7fe0774c9cab7
Merge "Fix verity on system partitions larger than 2G"
Fix Nick's nits

(cherry-pick of 97e487311b1cb780dfd3b0994917c72047d6188f.)

Change-Id: Ide7925e7ad328f0343d444d63ff72f1a26206d4c
Merge "Fix Nick's nits"