[Resolver] Refactored the method call/template instance/new expression depth search algorithm & API.