Parliament has voted to abolish the death penalty in Lebanon, potentially making it the first Middle Eastern country to formally end capital punishment.