Switch C compiler to clang.
Fix compilation errors.
Format code.

Using artistic style with following configuration:
--style=1tbs --indent=tab=2 --pad-oper --pad-paren-in --align-pointer=name --add-brackets --suffix=none
Remove cruft.
Remove obsolete telnet header file.
Enable POSIX 2008.
Fix compilation with pedantic.
Start wrapping in Go.
Merge branch 'master' into clang