Peccei-Quinn symmetry as flavor symmetry and grand unification