fix #8: Upgrade Smarty to 3.1.21
Temporarily removed native json_encode support, was breaking relay.
Import missing Smarty plugins.