For #5086, wait for old Quick Open bar to fully close before creating a new one.

Also moved some global state into the QuickNavigateDialog object to avoid reentrancy issues.

@peterflynn