Make sure the pool management process ends

I have replaced the user task with a loop that waits for status == "terminated"
Merge pull request #107 from andreisavu/issue-107

Make sure the pool management process terminates on destroy