Identification of Chemical Structures and Substructures via Deep Q-Learning and Supervised Learning of FTIR Spectra