Pore-Scale Flow Mechanisms and the Hydrodynamic Porosity of Porous Media in Surface Water Treatment and Groundwater Remediation