Made some fixes to the ACL inheritence system where certain edge cases were missed

* Added some commenting to the ACL parsing system to make it more readable
* Implemented inheritence fixes for role inheritence that didn't allow nested inheritence, or inheritence that was from an inherited type
* Added sorting to all iteration of dictionaries to make behaviour deterministic
* Added a few tests to confirm proper operation