remove -DDEBUG_MEM
1. only "shutdown" seems not working properly.
2. borrow threadpool.[hc] implementation from the git repositories.
3. but the fp entity does not use the threadpool now (require further work).