Fix a bug in the cache regeneration check

Atest currently determines whether the module cache is valid by
comparing the saved timestamps of the dependency files to their actual
timestamp.

This is not reliable because the check does not account for the output
file's timestamp relative. For example, switching to a different cache
file from a previous Atest version would not be correctly re-generated
since the input file timestamps seem up-to-date.

Another issue that can arise is that the list of input files may change
between Atest versions while the timestamp file references a different
set.

This changes simplifies the logic to simply compare the cache file's
timestamp to its input files' timestamps. This way the information is
baked into Atest preventing any possible version skew.

Bug: 281547254
Test: touch $ANDROID_PRODUCT_OUT/module-info.json; \
  atest-dev HelloWorldHostTest
Change-Id: Ie4a530ce6d1e2dd4d7acc30a53646c55584fd878
1 file changed