framework: occupy

@fengjingchao This works. need some refactoring. 
current approach is naive. 

the controller creates some task slots. the frameworks loop over the slots and try to occupy one by `CompareAndSwap`. This function will return the taskID that the framework successfully occupied.