Self-templated synthesis of hollow nanostructures