Finish event dispatching

This implementes stopPropagation, stopImmediatePropagation and fixes issues
with AT_TARGET.