[sanitizer] Sanitizer __internal_*stat interface.

With this change, __internal_*stat always expect a "struct stat *" argument.
This avoids stat/stat64 caller-side confusion (sanitizer_common tests already
made this mistake), and allows the use of __internal_fstat() as a drop-in
replacement for libc's fstat().


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181311 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Move GetThreadStackAndTls from TSan to sanitizer_common.

Move this function to sanitizer_common because LSan uses it too. Also, fix a bug
where the TLS range reported for main thread was off by the size of the thread
descriptor from libc (TSan doesn't care much, but for LSan it's critical).

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181322 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Fixed includes in sanitizer_linux.cc for Android.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@181327 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Fixed InitTlsSize for Android.

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