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
fixes #8277 - upgrade rails to 3.2.20
fixes #8302 - only return active images for openstack compute resources
Fixes #7462 - new UI for network interfaces
Fixes #7369 - External user groups update on login
UI - realm moved to the primary tab