French retailer Casino has sold its Venezuelan retail operations to the Latin American country's socialist government in what has been described as a "friendly" agreement.