Clean up and further extract Rule functionality

Changed Rule to abstract class with isAllowed as an abstract method.
Privilege class will return the result of the condition, the restriction
will return the negation.

Collection also got some improvements.