[C++] Fixed ThreadPoolTest
[C++] Fixed ThreadPoolTest

* Use shared_ptr for semaphores
* Use extra semaphores to wait for destructor calls

bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr,bmwcarit/joynr