Change database queries towards making only a single query per request
We're currently making up to four database requests to handle a single user request. We're re-using the same database connection for them, but we can very likely do better.
Maybe we can reduce this to making only a single database query per request. This might require some mild hacking, because we'd want the query response to contain at least the following information:
- table rows for the technical details part,
- addresses in the same /24 or /48 without details
- whether there were any consensuses in the database for the requested day or previous/next day, and
- dates of first and last consensus in the database.