Density functional theory study of the decomposition of Mg(OH)2: a lamellar dehydroxylation model