This will be useful later on, for example to be able to close a target (a page) once it gets cancelled.
We no longer have to keep a list of deprecated events to avoid panics in cdproto.
Adding some comments, removing unused items, and renaming handler.go to target.go to reflect the internal type name changes.