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

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