add logout hook to remove keys from session

fix #10232 

we reuse the old session if you logout and directly login again. The old session still contains the unencrypted keys even if the password changed in the meantime. This PR removes the keys from the session during logout. This also guarantees that we don't store the unencrypted keys longer as necessary in the session.

cc @DeepDiver1975 @icewind1991 @MorrisJobke please review it. Thanks!