Algerian MPs have passed a law that declares France's colonisation of the country a state crime and demands reparations and an apology.