House and Senate negotiators reached agreement Friday on a sweeping overhaul of the state's criminal justice system, ending several months of what were described as occasionally contentious discussions.The compromise unveiled by a six-member conference committee calls for a wide range of changes in how Massachusetts deals with crime and punishment issues.