Speeds up get_work with a number of small tweaks
Speeds up get_work with a number of small tweaks

Some profiling of get_work under different scheduler-state scenarios
showed some obvious areas for improvement without major algo changes.

The biggest contributor was in _upstream_status where the task_stack was
being re-allocated rather than appended-to (_upstream_status is used in
other places as well like task_list).

A remaining area for optimization is the sorting of pending tasks that
happens for each call; this would be a bigger change.

Magnetic/luigi,casey-green/luigi,mfcabrera/luigi,mbruggmann/luigi,ehdr/luigi,dstandish/luigi,ContextLogic/luigi,edx/luigi,Wattpad/luigi,rayrrr/luigi,lungetech/luigi,soxofaan/luigi,Tarrasch/luigi,foursquare/luigi,soxofaan/luigi,samepage-labs/luigi,riga/luigi,samepage-labs/luigi,PeteW/luigi,Houzz/luigi,ContextLogic/luigi,h3biomed/luigi,humanlongevity/luigi,PeteW/luigi,rayrrr/luigi,ivannotes/luigi,jamesmcm/luigi,ivannotes/luigi,fabriziodemaria/luigi,adaitche/luigi,stroykova/luigi,humanlongevity/luigi,soxofaan/luigi,javrasya/luigi,Tarrasch/luigi,dlstadther/luigi,linsomniac/luigi,rayrrr/luigi,riga/luigi,Wattpad/luigi,riga/luigi,h3biomed/luigi,dlstadther/luigi,samuell/luigi,Magnetic/luigi,javrasya/luigi,h3biomed/luigi,Magnetic/luigi,Magnetic/luigi,lungetech/luigi,edx/luigi,dstandish/luigi,republic-analytics/luigi,mfcabrera/luigi,linsomniac/luigi,humanlongevity/luigi,rayrrr/luigi,fabriziodemaria/luigi,ehdr/luigi,humanlongevity/luigi,ehdr/luigi,Wattpad/luigi,lungetech/luigi,rizzatti/luigi,ehdr/luigi,jamesmcm/luigi,fabriziodemaria/luigi,mfcabrera/luigi,PeteW/luigi,edx/luigi,mbruggmann/luigi,ivannotes/luigi,spotify/luigi,Houzz/luigi,rizzatti/luigi,dstandish/luigi,casey-green/luigi,fabriziodemaria/luigi,samepage-labs/luigi,PeteW/luigi,Tarrasch/luigi,lungetech/luigi,jw0201/luigi,republic-analytics/luigi,republic-analytics/luigi,rizzatti/luigi,samepage-labs/luigi,edx/luigi,rizzatti/luigi,spotify/luigi,foursquare/luigi,ContextLogic/luigi,riga/luigi,ContextLogic/luigi,dlstadther/luigi,linsomniac/luigi,soxofaan/luigi,casey-green/luigi,jw0201/luigi,stroykova/luigi,dlstadther/luigi,ivannotes/luigi,adaitche/luigi,Houzz/luigi,dstandish/luigi,spotify/luigi,foursquare/luigi,spotify/luigi,foursquare/luigi,stroykova/luigi,h3biomed/luigi,republic-analytics/luigi,adaitche/luigi,stroykova/luigi,samuell/luigi,mbruggmann/luigi,mbruggmann/luigi,jamesmcm/luigi,Tarrasch/luigi,samuell/luigi,jw0201/luigi,adaitche/luigi,samuell/luigi,jamesmcm/luigi,linsomniac/luigi,javrasya/luigi,javrasya/luigi,jw0201/luigi,casey-green/luigi,mfcabrera/luigi,Houzz/luigi