Genesis of a solid foam: iron(III) metaphosphate transformation in sol-gel crystallization processes