Measurement of b-quark fragmentation fractions in p bar p collisions at sqrt s = 1.8 TeV