Fix focus issues masked by sync editor rendering in spec

When the overlay decoration is destroyed, the actual element isn’t
removed from the DOM until the next animation frame. In specs all editor
updates are made synchronously to make things easier, but in this case
it masks issues with focus when the autocomplete is removed in an async
way. We should revisit this.