Hyperfine structure of metastable states of barium studied by atomic-beam magnetic-resonance with laser detection