Leftist FARC rebels have approved a landmark deal with the government, declaring an end to the five-decade war as it prepares to transition into a new political party.