Add Thread Pool, fix win32 compile issues and sync lua-vm