Bugfixes for TrikStudio

+ Restored subprograms generation (EPIC regression)
+ Restored NXT color sensor and other sensors work (regression)
+ Fixed segfault when trying to generate threads which start from the block with non-simple semantics