widgets: move thread cancellation to separate function
widgets/config: refactor widgets object to array

This change leads to a bit more verbose config file, but it's required
to in the future be able to have several variants of the same
widget (having the widgets stored in an object previously limited this
to one instance of each widget).

This could be useful for e.g. the disk space widget (one widget for each
drive you want to monitor so the C code doesn't have to handle that),
the e-mail checker widget (possibility to check multiple accounts), or
maybe even the weather widget (check multiple locations).
widgets: rename widget send update function -> widget_update
widgets: create macro for sending JSON data updates to web view
widgets: rename web view updater function