This prevents a crash in ImageDecoder when it's closed before any
image decoding requests have been made.
(cherry picked from commit 88176d4be2339108d9d54b8af62f5438f9c82f30)
Previously, init() in BackgroundAction.cpp was calling
Core::Object::set_name, which does not affect the displayed thread name
which is displayed by the system monitor. This changes it to pass the
name to the thread constructor.
Now that pthread_cond_t works correctly thanks to Sergey, we can use
them to wake up the BackgroundAction worker thread instead of making
a Unix pipe. :^)
The worker thread used for BackgroundAction was going to sleep for
1 second at a time (when there was nothing to do.) This made using
background actions for anything interactive quite unresponsive since
you had to wait up to 1 second before it even started on your task.
We now use a simple Unix pipe to signal the worker thread that a new
work item is available.
This makes Assistant way more responsive when typing. :^)