Currently if we close document on Assembly WB while having dialog
opened, it will throw segfault because it is not being auto closed
automatically during document close. This in turn resulted in dialog
having dangling references to document that was no longer existing,
throwing segfaults in random places.
So solution is simple - add `setAutoCloseOnDeletedDocument` for every
dialog in Assembly to avoid this situation and close every dialog upon
document close.