util: implement tryOccupyTask

This PR implements TryOccupyTask:
1. on master failure, standby task will get notified on the `health` key being deleted.
2. one of standby will create successfully a new `health` key and take over the task.
3. the new host should register relevant information at that point as well.