Previously if one of the threads other than the server failed,
it would log the error but continue to run in a broken state.
So instead this makes sure than if any thread finishes the whole
application stops.
Since all worker threads should always wait indefinitely for more work,
this should only happen if one of them bails on an error.
GitHub expects a 'Last-Modified' header, and honoring an
'X-Poll-Interval' header for their notifications endpoint.
Other services might also have certain limitations that require
customizing every API query individually.
Since that's not possible if API tasks are configured once and run off
of an interval, this reworks them so that the config needs to trigger
every query individually. A `delay` parameter allows re-creating the
same intervals that were possible before.
This also moves the configuration for Ntfy to the Lua file.
The general architecture is a collection of four
threads.
Three threads that run their dedicated Tokio runtime and handle
the axum server, send outgoing notifications and run scheduled API
requests respectively. The fourth thread runs the Lua VM.
Channels exist between the threads to send messages and allow the Lua
script to orchestrate and configure everything.