Why jam needs pectin, sugar, and acid to set, how the gel forms, and why underripe fruit works better. The full science behind jam and jelly setting.