Changes for 2.0 event handling.

The principles are that:

1. All widget events are emitted as DOMNode events.
2. There shouldn't be any widget methods like onClick() anymore, unless the widget is using it
    internally, but then it should probably be called _onClick() with an underscore.
3. The widget already has functions like onclick and onchange, inherited from HTMLElement,
    but widgets should define functions like onfoo for non-standard event names.