Workers at a Chinese factory owned by the electronics manufacturer Foxconn threatened to leap from the roof of a building in Wuhan in a protest over wages and working conditions, echoing the tragedy of laborers who jumped to their deaths for similar reasons two years earlier at other company plants.