It was a scourge of centuries past, a disease that ravaged the body and brain, drove geniuses to madness and slowly brought its victims to a terrible death. But syphilis, a sexually transmitted disease that was so rare by 1998 that federal health officials had planned to declare it eliminated by 2005, has made a troubling comeback in New York City and across the nation. In the first three months of this year, more than twice as many syphilis cases were diagnosed than were in the first quarter of 2006, according to the city Department of Health and Mental Hygiene.