Add env variable for MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES
Add env variable for `MAX_IN_MEMORY_DATASET_SIZE_IN_BYTES`.

This will allow to turn off default behavior: loading in memory (and not caching) small datasets.

Fix #2387.