Hadronic penguin B decays in the standard and the two-Higgs-doublet models