why were factories necessary for the industrial revolution to be successful? what did the first factories in the industrial revolution produce?