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

svn path=/trunk/libs/thread/; revision=84597