Graceful shutdown from Settings > Advanced.

 - Refactor to have reference to MarketApplication at the ProtocolHandlers level.
 - Shutdown routine tries to shutdown BitMessage's ServerProxy connection if possible.
 - DHT,DB,etc shutdown routines might need to be implemented if it makes sense to do so.