We tend to think of weight-loss regimes as the product of our image-obsessed age – but Byron and Nietzsche were on them too. Louise Foxcroft chronicles the diet industry's ups and downs, from laxative gum to rubber knickers