Suboptimal for-loop transformation in regards to closure iters
### Description

For-loop transformation places for-loop variables before the transformed code, unnecessarily extending their scope, and then closure iters transformation lifts such variables because they appear in more than one state. I.e. the following:
```nim
iterator fooItems(a: seq[int]): int =
  var i = 0
  while i < a.len:
    yield a[i]

iterator myClos(): int {.closure.} =
  var a = @[1, 2, 3]
  for el in fooItems(a):
    yield el
```
Roughly translates to:
```nim
iterator myClos(): int {.closure.} =
  # STATE 1
  var a = @[1, 2, 3]
  var el: int # <- Offending declaration which leads to lifting el even though otherwise it is not needed 
  var i = 0
  # STATE 2
  while i < a.len:
    el = a[i]
    # The line above should contain the declaration instead
    yield el
    # STATE 3
  # STATE 4
```


This suboptimality became relevant only after #23787.

### Nim Version

Nim Compiler Version 2.1.9 [Linux: amd64]
Compiled at 2024-08-21
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: e38cbd3c846a8e95bed0d709e4d61cc1ad5279b2
active boot switches: -d:release

### Possible Solution

The better option would be to declare for-loop variables in place of nkYields during for-loop transformation.
