Fixes #82412: Add feature deactivation after logout left the popup open ...

...if a feature had been just drawn. Better tool deactivation have been added, and also we have removed the hideous confirmation dialog that the popup added by clearing the feature's dirty state before closing the popup.