Server IPv6 support

(Again based on the open PR #47 because it is a fundamental change. Sorry.)