DUBLIN — Ireland has voted resoundingly to legalize gay marriage in the world’s first national vote on the issue, leaders on both sides of the Irish referendum declared Saturday even as official ballot counting continued.