Delay refresh when task add/edit dialog visible

**Jon: feel free to nitpick code style preferences, or anything else..** I'm happy to make updates.

***

Modifies auto-refresh to postpone the call to `window.location.reload()`
if the DOM contains a div matching `div.workitem-dialog`. In this case,
we re-test every 5 seconds to see if the dialog has closed.


I think the extension should CTFO if the user is potentially
adding/updating a task.