Improve ORM caching

Following the discussion in cakephp/cakephp#3446 this should improve the ORM performance by:

* Enabling metadata caching by default.
* Setting a longer duration for debug caches.
* Restoring the 99 years duration for debug=false.