Brazil's left-wing President Lula is elected for a fourth term, beating Flávio Bolsonaro in a knife-edge vote