Include core translations

Moved search result type translations to search.js

Load JS translations earlier

Translations need to be loaded earlier to make sure that some JS files
like search.js get access to translations at this time.

This requires the template initialization to be moved to after session
initialization, because only after the session we have access to the
current language.
adding console command to generate javascript translation files based on existing php translation files
read server side translations from json files
update all translation files to js and json