Extract quorum-size calculation to utility method.

The behavior's the same as before; this just makes the code (IMHO) a
little easier to read.

Change-Id: Ie54d836d81af7410057219f60b72b840c9ce51b9
Merge "Extract quorum-size calculation to utility method."