Formation and stability of porous structure of pillared clays