  Recent years have brought more precise temperature measurements of the
low-density intergalactic medium (IGM). These new measurements constrain the
processes that heated the IGM, such as the reionization of H I and of He II. We
present a semi-analytical model for the thermal history of the IGM that follows
the photoheating history of primordial gas. Our model adopts a multizone
approach that, compared to previous models, more accurately captures the
inhomogeneous heating and cooling of the IGM during patchy reionization. We
compare our model with recent temperature measurements spanning z = 1.6-4.8,
finding that these measurements are consistent with scenarios in which the He
II was reionized at z = 3-4 by quasars. Significantly longer duration or higher
redshift He II reionization scenarios are ruled out by the measurements. For
hydrogen reionization, we find that only low-redshift and high-temperature
scenarios are excluded. For example, a model in which the IGM was heated to 30
000 K when an ionization front passed, and with hydrogen reionization occurring
over 6 < z < 9, is ruled out. Finally, we place constraints on how much heating
could owe to TeV blazars, cosmic rays, and other non-standard mechanisms. We
find that by z = 2, a maximum of 1 eV of additional heat could be injected per
baryon over standard photoheating-only models, with this limit becoming <~0.5
eV at z > 3.
