[dua] fix potential issue in DUA.rsp & DUA.ntf processing (#6816)
[dua] fix potential issue in DUA.rsp & DUA.ntf processing (#6816)

There is a potential bug in
DuaManager::ProcessDuaResponse(Coap::Message &aMessage).

The original code finds the Child by Child *child =
Get<ChildTable>().GetChildAtIndex(mChildIndexDuaRegistering);, which
assumes that the DUA.rsp must be targeting the current registering
Child. This is true for DUA.rsp, but not correct for DUA.ntf because
BBR may send DUA.ntf at any time to any device.

So, this commit changes DuaManager::ProcessDuaResponse code to search
for the correct Child with the target DUA instead of using
mChildIndexDuaRegistering.

This commit also contains other refactoring on
mChildIndexDuaRegistering usage.
openthread/openthread,abtink/openthread,srickardti/openthread,openthread/openthread,openthread/openthread,jwhui/openthread,openthread/openthread,jwhui/openthread,srickardti/openthread,abtink/openthread,srickardti/openthread,jwhui/openthread,srickardti/openthread,abtink/openthread,abtink/openthread,jwhui/openthread