What factors contributed to the increase in manufacturing jobs in the northern states during the mid-1800s?