mongo-utils: Fix parsing addresses without a port name

When the address does not have a port, set the output port parameter to
-1. This fixes #24.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
mongo-sync: Only close the FD on reconnect if needed

When reconnecting and replacing the old FD with the new, only close the
old one if it is different from the new, otherwise we will end up
closing the new socket too. This fixes #25.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
mongo-utils: Allow -1 as port in mongo_util_parse_addr()

When using replica-sets with unix domain sockets, we end up putting
paths with -1 ports into the internal seed list. mongo_connect()
understands that, but mongo_util_parse_addr() needs to handle that
similarly too. To this end, allow -1 (MONGO_CONN_LOCAL) when parsing
addresses.

This really fixes #24.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>