Finishes the action mode when the fragment is stopped.