A few fixes for race conditions and similar problems

Hi,
please consider merging these three patches.

The third patch is a bit more invasive as it changes how signals are handled. I did my best not to change anything about the logic, but please review it especially carefully... It is the most important patch though as it fixes a real problem I see on my test systems: Two RAs received quickly after each other (e.g. because there are multiple routers in a network) caused do_signal to be SIGIO at the end of odhcp6c_signal_process, resetting the DHCP request and thus the solicitation backof interval.