Residual Gas Fraction Estimation: Application to a GDI Engine with Variable Valve Timing and EGR