iotune: properly propagate exceptions to the main thread
iotune: properly propagate exceptions to the main thread

For iotune to work, we need to have n independent workers pushing
concurrency into the disk. We do that by spawning one thread per
available core and assigning work to them.

The problem with that is that those threads can throw exceptions, and
the way exceptions work, they will not be propagated to the main thread.

This patch wraps the thread code together with an std::future by means
of a packaged_task. This way, we can easily communicate any exceptions
back to the main thread. The control flow has to be changed for that to
happen, and now a new thread is created for every step.

After this patch is applied, iotune will no longer generate a coredump
on timeout exceptions - a result of them being thrown in a thread, but
exit gracefully instead.

Signed-off-by: Glauber Costa <7ba9037b0dd006f9408bd45b94707becd5cd4e87@scylladb.com>

cloudius-systems/seastar,scylladb/seastar,syuu1228/seastar,dreamsxin/seastar,avikivity/seastar,dreamsxin/seastar,dreamsxin/seastar,avikivity/seastar,cloudius-systems/seastar,syuu1228/seastar,scylladb/seastar,scylladb/seastar,avikivity/seastar,syuu1228/seastar,cloudius-systems/seastar