Formation of thermal wave trains in loop reactors: Stability limits and spatiotemporal structure for reversible reactions