A late rally from Leinster carried them to a narrow Guinness PRO14 victory over 14-man Benetton Treviso.