Revert "Revert "Refactor annotation code for obsolete methods.""

The number of InterruptedExceptions created during runtime shutdown is
sometimes inconsistent so we will filter those out of the test results.

This reverts commit 65e0775010121498a37fa26c64fcc5bb17a6c1b5.

Reason for revert: Fixed issue with test flakes

Bug: 31455788
Test: stress --cpu 60; while ./test/run-test --host 980; do; done

Change-Id: Idf53ea11ceec1f48c433da468b31092bf230de57
15 files changed