Refs #3809 - Remove useless assignments
Fixes #8405 - Filter :interfaces_attributes when calculating templates_used
Fixes #7908 - normalize mac before host get saved

For some reason we save host without running valdiations when we import
attributes from facts. Therefore we have to take care of mac
normalization by ourselves. We have to normalize it just after setting
new value because save can occure anytime.
Fixes #8456 - normalize addresses only if mac is being set
fixes #8457 - auto complete search clear btn is now positioned correctly

in non index pages which uses auto complete (e.g. filters) the clear
button was not inside the input field.
Fixes #7456 - Extract primary interface from host

All host must have at least one primary interface and one provision (can
be the same interface). Primary interface gives host a name so even
unamanaged host have primary interface (we skip validations of other
attributes for unamanged hosts though).

Host still have name attribute which is a cache of primary interface name.
Therefore we can use the host name in SQL queries, as a friendly_id etc.
Fix functional tests
Fix more tests
Fix integration tests
Fix rest of tests
Fix rebase issues
Test mysql fix
Add debugging info
Fix tests on PG
Parsing and primary interface detection
Fix creation from UI - find_by_mac, mac validation, missing flags
Fix VM orchestration
Fix TFTP orchestration with VM
Fix host -> NIC orchestration
retrigger orchestration just if needed optimization