Refactor image averaging

I wanted to check with @matze first because it is quite different from before. Now one can do:

```python
averager = get_image_averager()
producer(averager())
do_stuff_with(averager.average)
```

It seems more pythonic, but strictly speaking the outer `get_image_averager` is not a coroutine anymore.