The gooey snack became popular thanks to technological advances of the Industrial Revolution, which brought cheap sweets to the masses