How was theoretical science applied to engineering and industry in the late 19th century during the second scientific revolution?