Fix orm_cache tool when metadata cache is disabled.

Fix error from when metadata cache was refactored. Add missing tests.

Refs #5061
Merge pull request #5071 from cakephp/issue-5061

Fix orm_cache tool when metadata cache is disabled.