mostly fix Issue 7151 - [CTFE] cannot compare classes with ==

Essentially, copy the implementation of opEquals into object.di.
Comparison of TypeInfo objects still doesn't work. Seems to be a dmd
issue.

This feels pretty trivial for an issue that's been open so long. Am I missing something?

I'm not sure if I put the test in the proper location.

https://issues.dlang.org/show_bug.cgi?id=7151
I thought it was just an optimization, saving one `opEquals` call.

I guess one could rely on this and make `(a == b) != (b == a)`, but that's just asking for trouble, isn't it?

If we really need to support that, I guess we have to fix the issue with `typeid`/`TypeInfo` first.