Statistical mechanics of Ising chains in random magnetic fields