Realign voting periods
Addresses #1151 (closed) and replaces !2806 (closed): the solution here is to realign voting periods with cycles, both when loading from Genesis and Edo.
I have manually tested the mainnet migration as described here: https://tezos.gitlab.io/developer/proposal_testing.html. Except for the wrong results given by certain RPCs, see the comments below, I consider it has worked correctly: the voting periods and the cycles do become aligned. However, I did not let the chain advance for a full voting period.
Edited by Eugen Zalinescu