More than 30 people were charged in what prosecutors said was a gambling scheme involving N.B.A. players and coaches.