Dehydration and crystallization of amorphous calcium carbonate in solution and in air