BEIRUT, Lebanon — Ahmed Hamadeh had spent a year in a jail in a Damascus suburb when guards chained him to fellow inmates, marched them to an outlying military checkpoint, and ordered them to dig trenches for the soldiers. He concluded that the government had “lost its mind,” he recalled later, not only because the move risked a jailbreak, but also because of the arbitrary violence that followed.