A French-Algerian activist has been sentenced to 10 years in prison for allegedly leaving Algeria "illegally."