Provide context to 'action' function. Clean up DOM on destroy

This fixes #2 by providing 'action' functions with the DOM element that was right-clicked as their second argument.

It also fixes #1 by removing context menus from the DOM on destroy.