Recursive Aco lookup avoiding slow $this->Acl->check().

I’ve noticed that on big projects the ACL manager was incredible slow making it frustrating to work with. The permissions view would take up to minutes to render.

I’ve made an attempt to solve this problem by adding a function that recursively checks the parents Aco permissions by doing as few database lookups as possible. For my projects it all seems to work 
nicely. I haven’t tested it extensively though. 

The changes should be compatible with CakePHP 2.0.