Add twig to project via composer

Twig will be the new template engine for the app. Composer will be used
to manage external dependencies such as Twig and any other libraries
that end up being used.
Clean up undefined variables errors
Add COPYING

Added GPLv3 COPYING file and a full GPLv3 header to the main entry point
script.
Clean up some cruft

- Deleted the schema.php file. Not needed with new DAO layer.
- Prune unused global variables.
- Move initialization of Lang to index.php
Ignore phpenv's version file
Convert template/apply.php to twig template