Measurement of b-hadron branching fractions for two-body decays into charmless charged hadrons