Shutdown old heartbeat sender when initializing a new one

References #172.