add retry logic when calls to API fail.
if API reconnects fail, restart lotus-daemon as it means lotus-daemon is likely unhealthy.
wait for lotus node's chain to sync during each check cycle, to avoid restarting lotus-daemon if needing to sync.
handle SIGTERM properly.
general cleanup and refactor of code, getting ready of unnecessary channels