Do Not Merge: Match the DHCP specification of last-wins leases

Just sending this PR mainly to get the tests to run on Jenkins - I'm not entirely happy with it yet...

Discussion of the issue can be found here: http://projects.theforeman.org/issues/5648

This attempts to preserve the current proxy behaviour of indexing DHCP records by IP, and only re-indexes by mac (thus updating/removing duplicates) when specifically searching for a mac record.