fix(turbopack): Consider scoping of `var` declarations (#77954)
### What?
Fix turbopack es analyzer, for the case below
```js
const shouldRun = () => false;
export default function run() {
if (shouldRun()) {
var x = true;
}
if (x) {
return 'should not run';
}
return 'should run';
}
```
### Why?
### How?
Fixes #77126
Closes PACK-4159