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.
The issue was that search results from other providers (contacts,
calendar, etc.) were unformatted, like 'event' or 'contact', while the
built-in event types (folder, file, etc.) were being modified by custom
result functions to something like 'Files' or 'Folders'. The fix is to
capitalize and translate all result types by default. Custom formatting
is still allowed (and example documentation has been added) but the
built-in result formatters where now unnecessary and were removed.
use places/folder icon,
move link construction to JS,
only show icon on hover,
use 'searchresult' as css class name,
add filter/unfilter methods,
highlight searched files in current filelist
only filter when correct FileList is present