Make this extension composer ready.

Add composer.json
Modify extension and bring compability for work with composer-installed Smarty.

Now you don't need to set Smarty dir, it will be autoloaded via composer autoload.

Also need to update documentation. 

It should be reverted to use `create_function` since there's no reason to actually raise requirements.