better fix than r9338
rename TabBarInTitleBar to TabsInTitlebar and change the default value
don't prematurely remember a new default window position (fixes issue 2685)
unify closing a document for replacing it in CloseDocumentInTab (fixes double-taskbar issue)