Topological Casimir Effect in Nanotubes and Nanoloops