IPv6 support and listening to custom addresses

This patch adds IPv6 support for obigstore as well as the ability for
the obigstore server to listen to custom (user-defined) IP addresses
or hostnames.

Now Unix.getaddrinfo is used to obtain sockaddrs so that users can
supply domain names and services names as well, instead of being
forced to use IP addresses and integer port numbers.

This fixes #3 and #4

Signed-off-by: Vincent Bernardoff <vb@luminar.eu.org>
Try all address infos returned by getaddrinfo in obigstore

Previously, when specifying the master's address, only the first one
was tried before failing, this caused a problem, for example if using
"localhost", and the master was listening to IPv4 localhost, the
connection would fail because the client would pick IPv6 localhost by
default.

This commit also add much refactoring of obigstore.ml, notably
replacing run_slave by a get_synced_db function, since the code to
launch the local server is identical, I found it handy to factor it.

Some modernization of Lwt code is done as well (Lwt_unix.run -> Lwt_main.run)

Signed-off-by: Vincent Bernardoff <vb@luminar.eu.org>
Refactoring

Use Lwt_stream.iter_s instead of using a recursive function with
Lwt_stream.get to iterate. Do not use put recursive code inside a
try_lwt ... with block, but instead do it at each iteration.

Signed-off-by: Vincent Bernardoff <vb@luminar.eu.org>
Merge pull request #5 from vbmithr/ipv6

IPv6 support and listening to custom addresses