Factor out PointerIdentity

This pull request has some backwards-incompatible change in semantics, but I doubt it will be a problem.

Particularly, if someone has subclassed, for example, LLVM::Function, and would be comparing an instance of that class with LLVM::Function with the same @ptr:

 * #== returns true,
 * #hash returns the same value, but
 * #eql? returns false

My change would cause #eql? to return true in this case.

I would say that this doesn't quite make sense, and is very unlikely to be an actual problem. I'm not sure that an ability to subclass LLVM::Stuff is valuable at all.