Structural features in the formation of the green rust intermediate and γ-FeOOH