SONAR-4069 Minor improvements and fixes for tasks
 * Try to break package cycle
 * Add validation on TaskDefinition