Optimize query in _select_dhcp_ips_for_network_ids

Only query the DB for relevant columns instead of
all of the port columns.

Partial-Bug: #1373851
Change-Id: I32cd4a0bc6799ce77cea13188676308e3e641d19
(cherry picked from commit 8d430a7f2e903dda06d8d75d6abcd63423c4c0a1)
Merge "Optimize query in _select_dhcp_ips_for_network_ids" into stable/juno