Move database access to a separate file.
Reject reports from older versions.

Fixes #2.
Simplify db connection handling.
Add a dedicated page to list message kinds.

Fixes #4, could do more but this shows something.