Adds a maximum tries when waiting for a thread to be taken over at initialization time, instead of looping forever. When the max is hit, a fatal error is raised, unless a newly added option -ignore_takeover_timeout is set.
The new option is used to ignore QEMU's own thread when running DR under QEMU. QEMU is not fully transparent and unfortunately does not hide its thread from DR in procfs.
Manually tested both option settings under QEMU. Regression tests with QEMU are planned for the test suite for ARM.
Issue: #4719