make bittorrent-dht extendible.

the end goal of this patchset is this:
https://github.com/xaiki/dht-exp/blob/master/dht.js

basically, be able to implement other extensions, and use your awesome code for moar things.

first patch is needed to make tests pass,
second patch adds ipv6 support, for free.

then we put together and export easy helper functions.
b9f62ee is not actually needed, but I think it's nice.

cheers.
it's for testing basically, you want to test *all* you do for ipv4 and ipv6 versions. that way you just `export IPV=6 npm test`

the var is argueably terrible.