move task_api to worker, implement newest api spec

task_api.py is worker's api and therefore it should suppose to be a part
of worker