Continuation of #721, this type using mktypes.sh that I didn't know at the time.
Weirdly, `go tool cgo -godefs` doesn't produce propery go-fmt-ed code, had to do run go-fmt manually afterwards.
Use the syscall wrapper and types from golang.org/x/sys/unix instead of
implementing them locally.
Also remove unused generated types and consts.
Follow-up for #810 and #812