[DF-4841] JobManager implementation reworker
[DF-185] Little fixes in Function class
[DF-4841] Added semaphore primitive