Refactor createInterface into a new class

To be expanded later, but this big nasty method is now a bit more separated
and hopefully easier to maintain.

Adds oojs as a dependency, for EventEmitter use. Not oojs-ui.

Change-Id: I033b9d18653364f413c3b675118ba6048de16f2b
Phabricator: http://fab.wmflabs.org/T453
Merge "Refactor createInterface into a new class"