std::rt: Implement task yielding. Fix a starvation problem

Last time I tried to land this it was timing out. It's pretty important for scheduling though so I want to keep throwing it at the bots while I try to figure out what the problem is.