Former El Salvador president Mauricio Funes, who spent the final years of his life in Nicaragua to avoid various criminal sentences, has died aged 65.