refactorings

- reimplement lambda variable as member function (emit_func_prototype)
- include a proper header (Type.h)
- fix assertion (function template is not visited yet when forward reference)
emit IR for 'if' statement