adding thread_id api call

Continuing discussion about manual kill of hung mysql connection threads (https://groups.google.com/forum/#!topic/openresty-en/3gbr1Zn49-o)