Quark masses and mixings in the 3-3-1 model with neutral leptons based on D4 flavor symmetry