[resolver] simplify\optimize WebPathResolver::remove