Update /etc/hosts when linked container is restarted

Fix #6350


I believe that we should check exact IPs from `docker inspect c1`. Maybe `grep c1 hosts | cut -f 2`.
Or even more, possibly we should ping c1 from c2 and look in logs, that there is no `No route to host` messages.