Only post shutdown event to io_service if there is an event loop
Merge pull request #1 from simao/master

Only post shutdown event to io_service if there is an event loop