widgets: store thread ID in widget struct and active widgets in array
core: ignore interrupt signals when waiting for threads to exit
widgets: wait for webview mutex in widget threads instead of the main thread
widgets: improve load_status_cb function readability
widgets: exit with macro that signals the main thread
widgets: add timeout for threads to finish

If threads don't send the condition signal (with the clean exit macro)
before the cond wait times out the thread will be cancelled; threads
that don't reach the epoll wait in their main loop before being
signalled to exit may block until the next timed loop, which can be very
long for e.g. e-mail and IP widgets.

Currently the timeout is two seconds, which should be enough for most
widgets to finish.
Merge branch 'fix/reload-freeze' into develop