Refix issue #189 and #172.

Popover is only repositioned on a context change event, not by some
a frequently firing timer event.
Improve placement logic

Previous logic would drop the popover to the bottom if it fell off the top
or the left. The new code only moves it to the right if it drops off the left,
leaving it at the top. In addition, it drops it to the bottom if it will drop
off the top of the editor, thereby not placing it over the toolbar, at least
initially.
No longer extend document to make space for popover

We decided to rather place the popover on top.