Add configurable limit to ensure a minimum amount of free space is preserved

- default to 100MB of free space
- currently disabled on android due to missing sys/statvfs.h