Measurements of the Proton and Deuteron Spin Structure Function g1 in the Resonance Region