[sanitizer] Partial revert of recent ioctl changes.

Some build environments are missing the required headers.
This reverts r200544, r200547, r200551. This does not revert the change that
introduced READWRITE ioctl type.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@200567 91177308-0d34-0410-b5e6-96231b3b80d8