Add `Client_main.find_master'`

This patch adds `Client_main.find_master'`, which should be a more resilient master lookup algorithm.

It also reworks `Client_main.find_master` to use the new `find_master'`, but keep the behaviour of the original action regarding error handling.
Don't we want to throw an exception here when the count would go below 0?
Seems like an incorrect usage to me... (but I honestly haven't looked at APIs for countdown latches in other places, so not sure what the standard behavior there is)