Added SQL_DEBUG setting

With SQL_DEBUG enabled, all executed SQL queries get printed to stdout.
Optimized database access in swid-measurement endpoint
Moved inventory und log view js files to swid app
Added sorting to reported by device table
Changed result table-headers from td to th
Prevent dates and some titles from wrapping