[Refactoring] around lambda type deduction

In git-head, `deduceType` can directly handle argument expression in IFTI. So move some code in it, and simplify `inferType` function.