Cohesin mediates DNA loop extrusion and sister chromatid cohesion by distinct mechanisms