[mle] fix bug in child link sync after reset (#2135)
[mle] fix bug in child link sync after reset (#2135)

This commit fixes a bug when a child coming out of reset attempts to
re-establish the link to its parent.  Upon coming out of reset, a child
will restore state from non-volatile memory, including its IEEE 802.15.4
Short Address.  If the child fails to receive an MLE Child Update Response,
it begins the normal MLE Attach process in search for a new parent.  However,
prior to this commit, the device would not reset its state back to the
detached state.  As a result, a child may be stuck sending IEEE 802.15.4
Data Request messages using its old (probably invalid) Short Address.

This commit also enables retransmission of MLE Child Update Request
messages immediately after a reset.  This increases the child's likelihood
of maintaining its existing parent, which is a desirable property in Thread.
gandreello/openthread,librasungirl/openthread,fbsder/openthread,fbsder/openthread,mszczodrak/openthread,aeliot/openthread,georgecpr/openthread,fbsder/openthread,aeliot/openthread,aeliot/openthread,LeZhang2016/openthread,erja-gp/openthread,LeZhang2016/openthread,vaas-krish/openthread,vaas-krish/openthread,vaas-krish/openthread,LeZhang2016/openthread,georgecpr/openthread,jwhui/openthread,chshu/openthread,turon/openthread,gandreello/openthread,xiaom-GitHub/openthread,lanyuwen/openthread,LeZhang2016/openthread,gandreello/openthread,erja-gp/openthread,pvanhorn/openthread,librasungirl/openthread,pvanhorn/openthread,xiaom-GitHub/openthread,xiaom-GitHub/openthread,vaas-krish/openthread,chshu/openthread,bukepo/openthread,turon/openthread,erja-gp/openthread,bukepo/openthread,lanyuwen/openthread,bukepo/openthread,mszczodrak/openthread,georgecpr/openthread,turon/openthread,vaas-krish/openthread,vaas-krish/openthread,jwhui/openthread,aeliot/openthread,fbsder/openthread,erja-gp/openthread,openthread/openthread,gandreello/openthread,pvanhorn/openthread,chshu/openthread,aeliot/openthread,aeliot/openthread,mszczodrak/openthread,openthread/openthread,turon/openthread,erja-gp/openthread,xiaom-GitHub/openthread,librasungirl/openthread,chshu/openthread,abtink/openthread,librasungirl/openthread,pvanhorn/openthread,openthread/openthread,mszczodrak/openthread,georgecpr/openthread,abtink/openthread,srickardti/openthread,xiaom-GitHub/openthread,georgecpr/openthread,jwhui/openthread,xiaom-GitHub/openthread,fbsder/openthread,chshu/openthread,gandreello/openthread,lanyuwen/openthread,lanyuwen/openthread,fbsder/openthread,srickardti/openthread,lanyuwen/openthread,lanyuwen/openthread,mszczodrak/openthread,pvanhorn/openthread,openthread/openthread,mszczodrak/openthread,pvanhorn/openthread,srickardti/openthread,gandreello/openthread,erja-gp/openthread,abtink/openthread,jwhui/openthread,georgecpr/openthread,LeZhang2016/openthread,bukepo/openthread,abtink/openthread,LeZhang2016/openthread,srickardti/openthread,chshu/openthread