Measurements of branching fractions and CP-violating asymmetries in B0 → π+π-, K+π-, K+K- decays