implement smarty3

This enables Friendica Red to use Smarty3.

There's one change I made that I'd like to receive some attention. I broke the profile_load() function into two functions, profile_load() and profile_sidebar(). The reason for doing this was so that I could make sure all the theme decisions were made in the _init() function of the modules, while allowing the actual profile sidebar widget to be loaded in the _aside() function. It was pretty straightforward to implement this change in all modules except profile.php. Therefore, it'd be good to examine what I did there and ensure that I correctly understood what needs to happen for the now-separated functions.

Another note: replace_macros() should not be used any longer for processing internally-generated templates, like was formerly done with the theme_include() function in include/plugin.php