fdo#56617: Fix crash on closing beanshell dialog and the macro window.
fdo#56617: Fix crash on closing beanshell dialog and the macro window.

When removing an entry from the tree list, we need to

1) first remove the entry from the list,
2) broadcast its removal with the entry instance, then
3) finally delete the entry itself at the very end.

in this exact order, or else interesting stuff would ensue.

Change-Id: If42b141921ffe4ed36dce31f93a4a084204815bf

JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core