Tail recursion optimization
- Refactor to use visitor instead of if (instanceof)
- fix for builtins test
- tail recursion tracing logic extracted to the separate class
- minor cosmetic fixes