Hundreds of Palestinian prisoners agreed to halt a weekslong hunger strike on Monday in exchange for promises of better conditions, ending a standoff that left several participants clinging to life and drew thousands of Palestinians to the streets in shows of solidarity.