Add __eq__ and __ne__ to policy objects

This allows comparing with others to see if they are equal.
I'm surprised this hasn't come up in the past, but I've finally
got a use case where it's useful to know if the policy on a current
entity is equivalent to a canonical type of policy. Without this
change, it won't work.