Split the star formation task into two parts:
- The star formation bit
- The re-sorting bit.
The re-sorting bit is only relevant for the local stars-related tasks. So by doing so, we can move the communication of the star counts earlier into the task graph. This may help with #584.
I will work on improving the re-sorting bit next in a separate branch as we do not really need to re-sort everything. This will also help speed things up.