[GCC 4.4] Declaring atomic structures in <cstdatomic> instead of <atomic> is not a good idea.
[Compatibility] Early `boost::asio::io_service` from boost 1.40 has no method `stopped` - fixed with external variable.
[Style] Also some testing lambdas replaced with functors.