New template system

Porting of pluggable template system from Friendica:
- default to smarty3
- remove 'internal' template files
- use single location (view/tpl/ etc) for template files
- add utility to precompile smarty3 templates
- add precompiled templates