Memory footprint improvements
Three changes:
- Add the option to free the foreign data when dumping restart files
- Add the option to free the foreign data when rebuilding
- Make the allocation multiplicative factors parameters.
Edited by Matthieu Schaller