Memory footprint improvements around the FOF code
This was needed to get the big flamingo job going. Changes inspired by !1393.
Main ideas:
- Free all the foreign buffers when entering FOF
- In FOF only allocate the gpart foreign buffers as we do not need the rest
- Allocate the buffers as late as possible so that the memory can be used for the other FOF-search arrays before that.
- Restore all the buffers as they were when done.
Edited by Matthieu Schaller