Drug-checking device works in minutes to help reduce overdos