nicer cleanup of main window & less duplication of storage
use the fact that toolviews deregister themself ensure the id mapping is clean afterwards, too
this avoids any double work and we even ensure the deregister does properly cleanup the mapping