Handle offline Opal server in query subscriptions

- Catch error from an Opal server being offline, if so report it and continue with the next subscription instead of throwing the error up to
the cron handler.
- Also check the sum of changes for being over the threshold, not just individual per-connection values.
- Store the sum of matching values in the database instead of recalculating it every time, to simplify the code.