elf-core: Plug latent memory leak

ProcessElfCore::ParseThreadContextsFromNoteSegment was leaking
ThreadData for each ELF note found in core file.  We now allocate it
only once and use std::unique_ptr to ensure it is always being freed.

While at it make ParseFreeBSDThrMisc and ParseFreeBSDPrStatus take
ThreadData by reference, rather than pointer, since those arguments are
not optional.

Patch by Piotr Rak.

http://llvm-reviews.chandlerc.com/D2813


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