Energy stable and mass conservative numerical method for a generalized hydrodynamic phase-field model with different densities