Irish boxing legend Katie Taylor has retired after defeating Flora Pili in Dublin to become the undisputed light-welterweight champion.