VE-1667: Tracking for single media tool

I've added tracking to the single media dialog for inserting a gallery (with number of items recorded) and clicking the cancel button. I've also restored tracking for the closing of all dialogs.