Spectrally Resolved Mid-infrared Molecular Emission from Protoplanetary Disks and the Chemical Fingerprint of Planetesimal Formation