Optimized wfWaitForSlaves() to get the master positions for all LBs first

Change-Id: I4a4aa6a3f68ace85dcbfb73e982a16c62e21e6ed