llgs: fix thread names broken by recent native thread changes.

* Fixes the local stack variable return pointer usage in NativeThreadLinux::GetName().
* Changes NativeThreadProtocol::GetName() to return a std::string.
* Adds a unit test to verify thread names don't regress in the future.  Currently only run on Linux since I know default thread names there.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217717 91177308-0d34-0410-b5e6-96231b3b80d8
std::function is a better choice than a raw function pointer here. You probably still want to be careful about cleaning up stuff you captured, but it's not like a function pointer wasn't going to let you shoot yourself in the foot given enough dedication.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217718 91177308-0d34-0410-b5e6-96231b3b80d8
ResolveUsername should resolve "~" to the user's home directory as well as "~/".  This 
gets command-line file completion from ~ working again.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217719 91177308-0d34-0410-b5e6-96231b3b80d8
Revert 217719, that wasn't the right fix, that should complete user names, and
anyway /Vol doesn't complete correctly either.  Somehow we're chopping the names
up incorrectly before passing them into the completer.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217720 91177308-0d34-0410-b5e6-96231b3b80d8
Fix incorrect initializer list style.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217721 91177308-0d34-0410-b5e6-96231b3b80d8
Don't make paths with /Foo//bar, that confuses everybody down the line.
This gets the file completer for absolute paths working again.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217722 91177308-0d34-0410-b5e6-96231b3b80d8
Nope, I was right originally.  ResolveUsername should resolve "~" to the 
current user, and ResolvePartialUsername will resolve "~" to the list of
users.


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