chore(cache): reworks ElggMemcache and its core usage and adds a null cache to simplify logic

Fixes #7643