Fix Task and state printer bugs.

- Removed ITRON api objects in thread control
- fixes #1