libufdt: avoid to strdup() if possible

Memory allocation is slow in some platform. Uses stack to avoid
malloc/free if possible.

Also removed dto_strdup(). Doesn't need to implement it anymore.

Bug: 32969430
Test: ./tests/run_tests.sh
Change-Id: I68eae8fcf05e722089879ba3e95c55b136bb31ed
4 files changed