Modeling Nanoparticle-Stabilized Foam Flow in Porous Media Accounting for Particle Retention and Permeability Reduction