Measurements of CP-violating asymmetries and branching fractions in B decays to omega K and omega pi