Foliations in Algebraic and Birational Geometry