move fx_template_tokenizer class to a separate file and make it autoloadable
1. escape curly braces this way:
if (window.test) \{alert('ok');\}

2. output curly braces "as is" inside {raw}...{/raw} blocks

3. wrap contents of tag which has fx:raw="true" att with {raw}...{/raw} block

4. add fx:raw="true" by default to <script> and <style> if no fx:raw att specified on the tag

So we can:
<script src="{$template_dir}script.js">
   if (window.ok) {alert('ololo');}
</script>

And:
<script fx:raw="false">
if (window) \{
   window.template_dir = '{$template_dir}';
\}
</script>