[ATL] Close m_hKey in CRegKey destructor and when attaching to a new key (#3764)