In-beam measurement of the hydrogen hyperfine splitting-towards antihydrogen spectroscopy