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.