optimized PBServer.ElectRecoveryMaster to save which segments have been recovered so it doesn't iterate through segments twice; also made some minor improvements to ViewServer