[REG2.066a] Issue 12255 - opCmp requirement for AAs breaks code

https://issues.dlang.org/show_bug.cgi?id=12255

AAs should require equality and hashing for key types.

This PR is based on #3710 to guarantee correct hashing of AA keys.
I filed the issue in https://issues.dlang.org/show_bug.cgi?id=13052, then opened druntime fix https://github.com/D-Programming-Language/druntime/pull/867.