WIP: refactor into stream interface

Hey!

This is an attempt to the refactoring design discussed in MAAS week.

@robert-chiniquy worked on the original version and then we worked on this together.

Currently it's on `443` so either use `sudo` or change the port number in the code :-)

```
npm install # install dependencies
make # generate certificate
sudo node examples/heartbeats-only.js
```

Any thoughts?
It seems to be the only builtin sink that can dump json: https://github.com/pquerna/node-logmagic/blob/master/lib/logmagic.js#L263 But we can always make our own sink. How about a simple json dump?