gen: create our own taskcontext-creation methods

This is needed to workaround the fact that some distributions now
set -as-needed by default as linker behaviours. Since the RTT
component factory system uses static registration objects (a perfectly
valid system), the task libraries did not get linked with the deployments
that require them (no symbol from these libraries were used in the
binary), thus causing SIGSEGV at runtime (since the factory does not
get registered, the task contexts were NULL)