fix Issue 13045 - TypeInfo.getHash should return consistent result with object equality by default

If struct member field has toHash method, or has non-bitwise equality, generate __xtoHash implicitly to guarantee `a != b || typeid(S).getHash(&a) == typeid(S).getHash(&b)`.