Adding fairly crude interface to insert a new chart.
Handling event handler disconnection due to popover hiding.

Events are now attached on a parent element which doesn't get removed.
Merge branch 'markdown-insert-chart'. Resolves #83.