Buckling and Topological Defects in Graphene and Carbon Nanotubes