[Refactoring] around lambda type deduction in IFTI

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