Thread: fix packaged_task<void()> issue and add tests.

svn path=; revision=84597