net_connect(): don't return errno.

Returning errno is not a good idea since the numbers are
implementation defined and there is no good way on the LPC
side to make sense of the number.
Additionally there was a complaint about transient errors
not clearly identifiable.
We now return our own error numbers, defined in comm.h.
(fixes #427)
net_connect(): use getaddrinfo instead gethostbyname

gethostbyname() is obsoleted since about 10 years now.
Additionally this removes a lot of differences between
code for IPv4 and IPv6 and the respective precompiler
conditionals.