Draft: fix missing clean state for re-attach
previously switching the inferior may used old symbol data instead of the one from the new inferior
note: the result of this PR is not tested yet; if there are errors (which I need to check) then those should be relative easy to fix.
Edited by Simon Sobisch