First-of-its-kind implant detects and treats opioid overdoses