Fix HelloWorld attach test for Linux kernels with ptrace ancestor lockdown.

Similar to a recent test I fixed for gdb-remote attach scenarios, this
fix is for Linux kernels, such as Ubuntu's stock setup on 11.04-ish and
later, where ptrace starts requiring a ptracer to be an ancestor of the
inferior to be ptraced.  This change checks for Linux and the ptrace-related
flags.  If they're found, it tries to switch on the "allow any ptracer" mode
for the inferior as the first statements in the program.  It's a best-effort
solution - if the prctl call fails, the failure is ignored, and probably will
lead to the test failing.

The ptrace security behavior can be modified system-wide, but is outside the
scope of the test to address.  Hence I went with this particular solution.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@220650 91177308-0d34-0410-b5e6-96231b3b80d8
Added a missing call to 'Reset'.
HostThreadWindows::Join() did not call the Reset as is done by
the HostThreadPosix::Join(). As a result, future call to 
IsJoinable() can fail.

Committed as obvious.
 


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