France and its European allies have announced withdrawal of troops from Mali after almost a decade, following months of diplomatic crisis between the two countries.