Rewrote the hosts plugin, added tests and ipv6 support

Added support for ipv6 to the hosts plugin and added more tests (should fix #13)

Some notes:
* backward compatibility with the old plugin could be provided with the rebase plugin
* I added more than average comments because the plugin is very often referenced as an example and covers many interesting cases when writing a new plugin
* as far as I know `getaddrinfo` is part of the POSIX standard. Nothing should change with the plugin compatibility