Clear the profile if we fail to add new methods or classes

We may fail to add new data in the profile if it contains outdated data
(e.g. if the dex files we profiled were updated in the meantime). If this
happens, clear the profile to ensure we don't keep around useless data.

Test: m test-art-host, 595-profiling-saving
Bug: 77839992

(cherry picked from commit d5aeadeac0debd90d0a931c1d41bee6a2d32b209)

Merged-In: I6da21c3b8e39feeffe07da39a3b6bb4b271c1293
Change-Id: I6da21c3b8e39feeffe07da39a3b6bb4b271c1293
4 files changed