Properly clear the routing graph before shutting down the application