Port UDP motion layer fixes from ic_udpifc.c to udp2
This commit integrates critical UDP motion layer improvements from
commits a337ea2 and acec354b into the contrib/udp2 component,
addressing extreme-scenario issues in resource-constrained
environments.
More details see commits a337ea2 and acec354b.
Co-authored-by: zhaoxi <oracleloyal@gmail.com>