added method to cleanly shutdown node and client when destroying a MonitoringRepository instance