Add templating system for JavaScript files

{$base_url} is replaced by Freeder installation base URL
JS files e.g. foo.js are replaced in templates by js.php?script=foo
It could be used to minify scripts
Fix #47