Make managed() function as decorator (plus bonus cosmetics).

The idea was to remove the with block from this common idiom

```python
def func(*args, **kwargs):
    with managed(Session) as session:
         func_body(session)
```
by making `managed()` function as a decorator to a function that receives the open session as an argument:

```python
@managed(Session)
def func(session, *args, **kwargs)
    func_body(session)
```

Note that the session is opened each time `func()` is called and close when it returns (or raises an exception).