[Refactoring] Rename local variables
[Refactoring] Swap parameters loc and sc

Only overload related functions use (sc, loc) order, but others (Type::semantic, Type::resolve, functionParameters, etc) uses (loc, sc) order. Therefore align the parameter orders to the latter.
[Refactoring] Remove redundant argument setting
[Refactoring] Use resolveFuncCall in almost places
[Refactoring] Do not calculate buf if it is not necessary.
[Refactoring] Rename variable

targsi -> tiargs (== Template Instance ARGS)
Cleanup comments
Merge pull request #1695 from 9rnsr/refactor_funcall

Refactoring for function call mechanism