Revert "dialog: Don't destroy dialogs in timer while they're still being referenced"

This reverts commit 3eef4c8be5cc2b6ccba993a62f8c8039d1adf7da.

Reintroduces possible segfault in cleanup routine.