First draft: injected buffer implementation

Hi,

Not really a pull request, I just wanted to see if you had any thoughts on this. First time I've ever tried to do anything with Python.

I'd like to switch away from the raspberrypi module to using the OEM gateway. However since my main issue with the raspberrypi solution is instability / data loss, I'd like to back the OEM gateway with a persistent buffer (either file based or MySQL) rather than in-memory.

As a first draft, I've just tried to refactor the existing behaviour exactly into a new class, and then inject that dependency at runtime. This should mean that it's relatively easy to drop new concrete buffer implementations into place.

cheers,