ENH: Add ui.js module to emperor

This module aims to factor out all the code that currently is in charge
of creating HTML elements or to format UI elements.

Add test suite and index it for QUnit to test it.