[cts] fix incremental metrics crash test

In this test we intentionally block the streaming of a certain page in
the test apk to test all the metrics related to blocked streaming. We
used to hard-code the page index, which doesn't work across platforms.

Instead of using a hard-coded page index, use a device-side test to
parse the apk and get the index of a page that we can block. The blocked
page doesn't affect test run. We have to parse the apk on the device
because the there is no such library on the host-side.

Notice that the trick to pass data from device-side test to host-side
test is to use Instumentation.sendStatus(). The host-side test can get
the data from the test result listener.

BUG: 187353461
Test: atest com.android.cts.packagemanager.stats.host.IncrementalAppErrorStatsTests
Change-Id: I3dfa47c6fae4275f6562db279445e567d6ed4e0e
9 files changed