Intracavity laser spectroscopy and its application for studying chemical reactions