Fixes for namespace manager unit tests

Fixes memory leaks
Add unit test for the task queue mechanism

Change-Id: Ia9e2009325c277867170f84887242971c178819a
Refactor a bit the timeout part of the namespace manager

Change-Id: I8b46098ee511e9e71290540a35d1d0227ea85749
Merge pull request #10 from safchain/service_instance

Service instance