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.
remove test