Initial commit.

Rework of the python gateway.

Started from
https://github.com/emoncms/raspberrypi/commit/cfcc3701b7a1fa5eb88881a3bd831bb97ba408cf