BUG: `cat foo.nim | inim` broken; should use same strategy as in ipython (detect end of scope by an empty line)
## ipython works
tests/python/t02_inim_std_issue.py:
```py
"""
works:
cat tests/python/t02_inim_std_issue.py | ipython3
"""
print("foo")
print("bar1")

for i in range(10):
  print(i)

print("bar2")
```

Note: ipython can't work with the following (as is expected)
tests/python/t02_inim_std_issue2.py:
```py
print("foo")
print("bar1")

for i in range(10):
  print(i) # no empty line, won't work
print("bar2")
```

## inim doesn't work:
```
cat bugs/inim/t04_stdin_broken.nim | inim --showHeader:f
foo
bar
# fails
```

bugs/inim/t04_stdin_broken.nim:
```nim
echo "foo"
echo "bar"

for i in 0..10:
  echo i

echo "bar"
```

Note: I wouldn't expect it to work in this case (as in the ipython case)
bugs/inim/t04_stdin_broken2.nim:
```nim
echo "foo"
echo "bar"

for i in 0..10:
  echo i
echo "bar"
```

## summary
cat bugs/inim/t04_stdin_broken.nim | inim --showHeader:f
should work

cat bugs/inim/t04_stdin_broken2.nim | inim --showHeader:f
for this case, I believe it can also be made to work, but maybe a bit more tricky to implement:
instead of reading stdin line by line (or with multiline pase, see https://github.com/AndreiRegiani/INim/issues/8), read stdin until eof, and interpret accordingly: this should work in both interactive input and non-interactive input.
Note: maybe another way would be by detecting whether we're a tty.
