Cache folder is now configurable

Fixes #7623 

CC @icewind1991 @karlitschek @schiesbn (small heads up)

TODO:
- [x] Make cache dir configurable
- [x] Make encryption app use the setting (or use the cache class)
- [x] Check other locations in the code that might use it
- [ ] Check what happens when cache is full (chunks need to be cleant up automatically, waiting for another PR to be merged to check this)