After months of gridlock, lawmakers have reached a deal on a bill overhauling how Congress handles sexual harassment claims.