DETROIT — Kwame M. Kilpatrick, the former mayor of Detroit, stood before a federal judge on Thursday and apologized for putting the people of his city through a corruption scandal so vast that prosecutors say it helped accelerate Detroit’s march toward bankruptcy.