Assets fix

This PR fixed a nasty side effect, which impacts the way assets are searched in the following use case :

```smarty
    Here, default template for assets is "default"

    {* Stylesheets *}
    {stylesheets file='assets/css/styles.css'}
        <link rel="stylesheet" href="{$asset_url}">
    {/stylesheets}

    -> Get a stylesheet in the "toto" template

    {stylesheets file='assets/css/lestyle.css' template="toto"}
    <link href="{$asset_url}" bibi="popo" rel="stylesheet" type="text/css" />
    {/stylesheets}

    -> the default template is now toto. The following assets will be searched in the 'toto' template, and will not be found.

    {images file='assets/img/favicon.ico'}<link rel="shortcut icon" type="image/x-icon" href="{$asset_url}">{/images}
```
The clone keyword in SmartyParser::getTemplateDefinition() sdolve the problem. All other changes is this PR are cosmetic.