Cluster: use the failure report API to reimplement failure detection.

The new system detects a failure only when there is quorum from masters.
Cluster: log the event when we clear the FAIL flag.
Cluster: a few random fixes to the new failure detection.
setproctitle.c: declar tmp as static so valgrind will not detect a leak.