Merge branch 'cleanup'

For now we're done with cleaning up. Now it's time to introduce
templates and later on a database abstraction layer.

Also we should think about writing real test cases.
Made library twig a dependency

Provides a template engine.
Started using templates
Added template installer
Introduced functions to render errors and notices
Extracted functions from installer
Do not put tabs in config file
Output a complete html document when config.php exists
Made installer use templates