Implement Smarty3

This implements the new theme engine Zach just added.

It also fixes theme.php and the configuration options in freehaven.