Update /etc/hosts when linked container is restarted

Carry of #7092

closes #7092
fixes #6350

/cc @vieux
parent > source

Please see https://github.com/docker/docker/pull/7250 where transition from "parent / child" to "source / recipient" began.