Equation-of-State Approach to Model Relative Permeability Including Hysteresis and Wettability Alteration