Clean common intermediate files if overlay changed

This change cleans the packages' intermediate files if their overlays
changed between incremental builds.
If two builds have different overlay, they will have different R
classes, and so the jar files in the common intermediate dirs can
not be shared. Therefore incremental build can't be applied.

This change detects the overlay changes on package's base.
If a package's overlay is different from the previous build, its common
intermediate dir is nuked.
This makes broader incremental builds possible.

Change-Id: I368610ebbbbc85a80f9aecd714ab22cd78da7f12
4 files changed