Unregister observers when tearing down contexts.