Fix @target assignment in Event ctor.

I'm an idiot.
Move event dispatch code into event_dispatch.rb

Allows anything else to become an event dispatcher.

In addition, this breaks up a lot of the event dispatch logic into
other functions, so it's easier to sort of see how it works, hopefully.

dispatch_event_with_target is a looping function (though can be made
to only execute once by either providing the same target or passing
true for the once argument) that simply iterates over targets until it
stops getting new targets.

dispatch_event_to_target simply sends the event to the target if it's
capable of receiving it.

Most dispatch functions are implemented using one or both of these.
dispatch_event_with_target is implemented with dispatch_event_to_target
for example.
Remove old event dispatch code from Window.

Replaced with an EventDispatch include now.
Remove unused set require.