The man who was shot and killed by police on Thursday at the Army Aviation Training Center in Salem had given a threatening note to a guard at the airfield’s security gate, officials said.