On Tuesday, just weeks from graduating, she toiled late at night inside a machine shop in a chemistry lab, as she had for weeks while working on her senior thesis: investigating the possible use of liquid helium for detecting dark matter particles. Ms. Dufault, 22, was killed when her hair became caught in the lathe, whose rotating axis is used to hold materials like wood or metal being shaped.