refactoring: improve performance of GPX export

* load batches of caches instead of single caches
* do not load all caches to avoid huge memory usage