Hidden symmetries generate rigid folding mechanisms in periodic origami