France has handed over its two remaining military bases in Senegal, ending its 65-year presence in the African country.