Clear cache key when deactivating target

And other state too, while we're at it.

Bug: 57905
Change-Id: Ifd2744c841f302764cf57c13f4a760cbe80fa2e0
Merge "Clear cache key when deactivating target"