Added force_ipv6 option (experimental).

force_ipv6 can be true or false. Setting it to true will use AF_INET6
only for the socket initialization. Needs to be tested. Also added fail
checks at end of file for when the sockets and the logger fail to be
initialized.