Added async thrift interface
Multi Loop Support

The original design of libtasks was to implement the leader/followers
pattern. In this scenario one event loop is passed from worker thread
to worker thread. In certain situations this will not allow for optimal
throughput and responsiveness of an application.

To tackle that problem run modes have been added to libtasks. Two modes
are available:
  - single loop (default)
  - multi loop

The multi loop mode runs an event loop in each worker thread. If you
are using the build-in acceptor implementation you need to check your
code (See acceptor.h for more details). To activate the new mode, you
have to call

  dispatcher::init_run_mode(dispatcher::mode::MULTI_LOOP);

before setting up the dispatcher singleton by calling

  dispatcher::init_workers(num);

or

  dispatcher::instance();
Merge branch 'master' into multi_loop
Merge branch 'multi_loop' into thrift_async
Merge remote-tracking branch 'origin/thrift_async'
Added async thrift processing.
Mergeg async and multiloop branches, cleaned up cmake files, fixed issues with new compilers.
Merge branch 'master' of github.com:apohl79/libtasks
Reimplemented async thrift over uwsgi support

Instead of using threads to enable async thrift handling, the async
processor handles thrift messages now internally.

Executor thread pool

A new thread pool has been added that enables async operations similar
to std::async but threads will be reused. The thread pool grows and
shrinks dynamically. See test_exec.cpp for examples.

Task refacturing

Introduced the event_task and moved libev specifics from task to this
new class.
uwsgi_thrift_async_handler: Removed template parameter for return type

Usage of C++ decltype allows for automatic return type deduction for
accessing the result structure.
uwsgi_thrift_async_processor: Set sequence id in response
Added libev detection cmake module
Fixed test_exec
tests: increased timeouts and waiting times to make sure the threading tests do not fail
net_io_task: Fixed dispose in multi loop mode
Improved debug messages for tasks and renamed task_func to task_func_t.
net_io_task: Removed not needed includes
uwsgi_thrift_async_processor: Make seqid a member
http_sender: Fixed send() for multi loop
net_io_task: Improved multi loop code