FROM FOLIATIONS TO HOPF ALGEBROIDS: from foliations to crossedproduct algebras, Connes-Moscovici Hopf algebras for foliations (flat case), characteristic map and the index of transversely hypoelliptic differential operators, curvature and the need for the Hopf-algebroid cyclic cohomology