Add pointer comparison function
Add pointer comparison function

All our comparison functions are predicated on the same behaviour:

  * if the two pointers are the same, return true
  * if either pointer is NULL, return false
  * perform type-specific comparisons

Since the behaviour is the same, and we want to avoid discrepancies in
the existing code and in any future type we may add, we should abstract
the pointer comparison part into its own private function, so that we
perform the common checks; then, we can call a type-specific internal
function to perform the comparison on the content of the data.

ebassi/graphene,ebassi/graphene