Ticket #237 clean up gracefully without crashing

I believe this commit fixes everything except in the async
accept_connection_task() in node_impl::accept_loop()
Merge branch 'master' of github.com:BitShares/bitshares_toolkit

Conflicts:
	libraries/client/client.cpp