Use size_t to specify queue size instead int.
Now task_queue can specify internal queue capacity by its constructor.
Fix bugs and a warning of constructor.