Calif. Judge Ends Long-running Inmate Abuse Suit