S4 flavor symmetry and fermion masses: towards a grand unified theory of flavor