Template-induced morphological preservation and self-assembly of nonporous MgO nanostructures during the decomposition of nanoscale Mg(OH)2 precursors