Clean up emperor.js -- close #34

The summary of the changes that went on the emperor.js file are:

- All the file is now indented using tabs, spaces should be disallowed in the future for consistency.
- Function names have more descriptive names plus a small description of what it does.
- This module no longer removes "all-equal" categories from the mapping file, this is something that the user should be able to control from the command line.
- All the global variables used are now suffixed with a `g_`.
- The test suite was updated to reflect these changes.
- A lot of the commented code was removed.
- All if/else/try/catch/for statements use braces (even if they are only one line statements).
- Removed unused global variable declarations.

This should fix #34 (all the items described there).