React to ActionMode state changes

This should work with all standard ActionMode changes.
From what I can see there's no way to determine if the ActionMode is active after exiting then returning to the app (not without storing the state ourselves,) so it'll fail in that case.