Implemented PermissionsRegistry

Also overrode equals and hashCode in PermissionNode, added cloning
constructor, and allows the fromText constructor to trim whitespace
when decoding a permission node from string.

Added permission checkers to Rank.