Formatting implementation using new tree

This PR adds implementation of code formatting that works atop of new tree. I would not suggest to review the code commit-by-commit as intermediate checkins here often contain non-relevant details that are ultimately removed in final implementation.
i don't quite get this comment.  "if some format rule removes new line between ')' and '{'"  then we'll have:

```
while (true) { var x;
}
```

And 'var' will not be the first token in line.