The nation’s largest airline pilots union is fighting a drug testing proposal that safety groups hail as a major advance in the country’s efforts to fight misuse of addictive opioid painkillers.