[MERGE] add init/destroy function for the thread data

Signed-off-by: David Goulet <dgoulet@efficios.com>