Left-wing party head Horowitz says agreement includes commitment to recognize same-sex marriage; Islamist party chief won't support measure but says there could be freedom on vote