New ACL classes

Rewrote the existing ACL classes and created new ones. Refactored some
stuff too. Still have to implement new DB schema, smart caching and
other features.