Add connection.threadId to get MySQL connection ID

fixes #602