Generalized solenoids and C*-algebras