Portable ioctl calls

Add \_IOC macros (\<sys/ioccom.h\>, \<asm-generic/ioctl.h\>) for linux and bsd's, unify ioctl() calls.
FreeBSD: use modern pts(4) interface instead of the old pty(4) one.
Use cgo -godefs generated ztypes_GOOS_GOARCH.go approach as in the syscall package to handle native C types.