Lifshitz-type formulas for graphene and single-wall carbon nanotubes: van der Waals and Casimir interactions