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?
I feel we could have base class `AgentFeature` and `FeatureEndpoint`. In these base classes, we can provide default `_choose_connection()`, which users can override. When passing into an endpoint constructor, only instances of `FeatureEoint` are accepted, similar for an agent constructor.

When writing a feature, one can subclass both `FeatureAgent` and `FeatureEndpoint`. To make writing small features easier, we could also implement a `Feature` class, which multiple-inherits `FeatureAgent` and `FeatureEndpoint`, like the way `stream.Duplex` does.

Might be overkilling though. WDYT?