The agreement spares victims’ families the uncertainty of a capital trial by securing lengthy prison terms.