Improved template variable handling

PHP magic methods can be used to imitate getting/setting of public variables
on objects. This gets rid of the ugly $internal property.

- Allows $template->internal = 'foo'
- Better code clarity
Merge pull request #20 from alprs/fix/variables

Improved template variable handling