Prosecutors said Thomas Kwan used his “encyclopedic knowledge” of poisons in his plot to kill Patrick O’Hara.