Call only signal-safe functions (#3).
Ensure our signal handlers are installed.

It seems that some runtimes will change the signal
handler for no real reason. I think it's fair to
reinstall our own, given you can also not run the
program via huptime.

This approach is ugly. But we check the signal handler
installed at bind() in addition to at initialization.
We could override some of the signal manipulation
methods, but I think this would get ugly quickly.
Support large sockaddr bind() calls.

It seems that the JVM will pass large values for bind().
(Strangely, larger than sizeof(struct sockaddr)).

No matter, we support arbitrary when the bind() call was
successful. We also eliminate the getsockaddrinfo call,
and instead use the passed down bind information.
Merge pull request #15 from amscanne/java_support

Fix issues running under JVM.