Measurement of b-hadron pair production with the ATLAS detector in proton-proton collisions at \( \sqrt{s}=8 \) TeV