Improved exception handling

Use exceptions, internal error messages and states instead of printing errors. An
error_base class as well as a tasks_exception class have been added. The event_task
inherits from error_base to provide basic error reporting methods like set_error.
Switched C++1y features on and deprecated dispatcher::run(int num, ...)