Extract out core ReactEmitter functionality.

Other environments can make use of some of the logic in ReactEventEmitter.
Refactor ReactComponent to have no dependency on the DOM.

React is more than just a DOM app library, it is a component
abstraction library. This enforces that.