Refactored code of the event loop.
- Better implementation of aborting event loop.
- Created scheduler which will schedule tasks (not implemented yet)
- Scheduler serves also as mediator of task queues.