Decouple the sorting of part from the rebuilding.
No need to rebuild every time we need to sort the particles on the cell axis.
Steps:
- Add a counter for the particles to track their motion since the last sort.
- Use this counter to trigger the sorting tasks.
- Only trigger a rebuild when necessary.