Python interface for new API (Map/Reduce)

This (not quite complete) PR relies directly on #670.

A (more complex) example, tests for the python side of things and exceptions are still missing, but I wanted to get some early feedback since the core is done.