Checks whether the permission tree is valid.
Not DENY & ALLOW on the same level
All fields exist
The tree to check
Success(the validated permission tree) or a Failure(with the cause).