Restructured, improved modularization, added tests.

 - Restructured the directory structure.
 - Extracted the objects from objects.js
 - Extracted logger such that it can be used by other files.
 - Fixed problem with 5 second delay in xterm(ConfigureRequest resize).
 - Extracted conversion methods and added tests for the two functions.

Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>