Dispatch show / hide events for modals, tooltips, and their derivative components

Replaces pull request #525.