make max_cache_entries a parameter

merge together with https://github.com/RIOT-OS/RIOT/pull/389