Reland "New API to clean up all inline mocks after test"

This reverts commit 329a85d9908d05478ac758e2e418b96c1a93ebd4.

Bug: 140773999
Test: Builds.
Change-Id: I0acd08b903afdc24b05e2e5f99a5b411c07b5d5e
10 files changed