Add a print_values function
Use class' method instead

Note that this script is outdated and cannot work with the current
code to the old aftertime_init() function. Fix it is trivial though
Separate the template classes into init and render

This will allow us to keep a copy of app's main template for the
derived apps to act upon.
Also, move the two templating classes into a single file and change
the rest of the code in accordance
Move some code around
Add functions to set template variables
Init the template before calling the page method
Remove support to import the global app object

This means that the running app object is not available
for the templates at all.

If templates need to compute data, apps need to add it instead to
the templates with $this->template->set_var($name, $value). This means
that all business logic should be in the app, not in the template.

Apart from that, other variables are added automatically by the
parent class, such as params, errors and user info.
Remove unused param
No need to push the app object to the global scope