Mechanisms and kinetics of gel formation in geopolymers