preproc: Helper macros for template code generation.

Change-Id: Ieb1e543af5613db59a876a1ddbf23bb2bda75426
Reviewed-on: http://gerrit.aldebaran.lan:8080/13447
Reviewed-by: cgestes <gestes@aldebaran-robotics.com>
Reviewed-by: mnottale <mnottale@aldebaran-robotics.com>
Tested-by: mnottale <mnottale@aldebaran-robotics.com>
ThreadPool: Optimize by avoiding string creation.

Change-Id: I713f539cb5a572cec95b443af62cdfdd9da1103e
Reviewed-on: http://gerrit.aldebaran.lan:8080/13448
Reviewed-by: cgestes <gestes@aldebaran-robotics.com>
Reviewed-by: mnottale <mnottale@aldebaran-robotics.com>
Tested-by: mnottale <mnottale@aldebaran-robotics.com>