WL#8853: PERFORMANCE_SCHEMA, ADD COLUMN THREADS.THREAD_OS_ID

Affects: Server-5.7   —   Status: Complete

Add a column THREAD_OS_ID to table performance_schema.threads

Column DDL:
-----------

`THREAD_OS_ID` bigint(20) unsigned DEFAULT NULL

Semantic:
---------

Expose the "TID", or thread/task identifier, as defined by the underlying
operating system.

For example with Linux, this corresponds to gettid().

TID is a field exposed in particular:
- in perf: http://man7.org/linux/man-pages/man1/perf-stat.1.html
- is ps -L: http://man7.org/linux/man-pages/man1/ps.1.html
- in /proc/[pid]/task/[tid]: http://man7.org/linux/man-pages/man5/proc.5.html

For Windows, the thread id is visible in Process Explorer:
https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

Benefits:
---------

By exposing the thread TID in the performance schema, a dba can correlate:
- a user session (see existing column PROCESSLIST_ID)
- a server thread (see existing column THREAD_ID)
- to an operating system Light Weigh Process (LWP), aka a thread, with new
column THREAD_OS_ID.

This is critical to inspect / monitor MySQL server threads with tools external
to the server itself, such as linux perf.

User Documentation
==================

* http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-9.html
* http://dev.mysql.com/doc/refman/5.7/en/threads-table.html