Fix scheduler RPC deduplication, expand task_manager and rpc_queue.