[UI Actions] Rework to fix issues with bubbling

Because jQuery-triggered events bubble a bug with submit events not
bubbling was missed, meaning
when attached to forms ui actions would not be correctly triggered.

This change has led to adding event handlers to individual elements
again, as opposed to a single
per document. That performance improvement can be revisited in the
future.