console: fix namespace problems when using slapos console with scripts

When using slapos console on scripts defining functions, for example

```py
def my_request(*args, **kw):
  ...
  return request(*args, **kw)
```

the global names such as `request` where no longer available in the
namespace of the function, because of a wrong usage of exec regarding
locals/globals.

Co-authored-by: Kirill Smelkov <kirr@nexedi.com>
Status Job ID Name Coverage
  External
passed SlapOS.Eggs.UnitTest-Jerome.Python2

00:12:28

passed SlapOS.Eggs.UnitTest-Jerome.Python3

00:14:16