fixed a bug where PBServer.ElectRecoveryMaster wasn't waiting between queryPlan iterations, so redundant queries were rapidly being executed; I also added notes about optimization of the waiting, but we won't have time to implement them as they are more complex