Ion flocculation in water: From bulk to nanoporous membrane desalination