Refactor logging in loop to only log debug messages once
Refactor logging in loop to only log debug messages once

Logging entries in a loop to a file can be expensive for a large
number of objects (e.g. ports) in a loop. Rather than perform the
overhead of logging a debug entry for each line within the hosts
file, move the debug trace of the contents to after the loop to
bulk up the I/O operations.

Conflicts:
        neutron/agent/linux/dhcp.py

(cherry-picked from d93e0098ebd5f333d6f496f10a663cd4351410ae)
Change-Id: I3ad7864eeb2f959549ed356a1e34fa18804395cc
Closes-Bug: #1414218

redhat-openstack/neutron,redhat-openstack/neutron