Trees of cylinders and canonical splittings