Sitting in an office in Coast Guard headquarters, where the mission is to ensure the safety of the nation, Lt. Christopher P. Hasson took illicit opiates and plotted terror attacks that he hoped would spark a race war, according to the authorities. To outward appearances, the 49-year-old lieutenant was a suburban father with a desk job supplying Coast Guard ships, who was glimpsed by neighbors coming and going in uniform or walking his dogs with his wife.