Evolution of catalytic microenvironment governs substrate and product diversity in trichodiene synthase and other terpene fold enzymes.