restapi: External host provider

This patch adds the resources for the external host providers. The
representation of the resource will look like this:

  GET /externalhostproviders
  <external_host_providers>
    <external_host_provider id="{provider:id}">...</external_host_provider>
    ...
  </external_host_providers>

  GET /externalhostproviders/{provider:id}
  <external_host_provider id="{provider:id}">
    <name>myprovider</name>
    <description>My provider</description>
    <url>http://provider.example.com</url>
    <requires_authentication>true</requires_authentication>
    <username>myuser</username>
    <password>mypass</password>
  </external_host_provider>

The providers collection will support listing, getting, adding, and removing
providers, with the usual methods.

The provider resource will support getting, deleting and updating the provider,
with the usual methods. In addition it will support the "testconnectivity" and
"importcertificates" operation. The first is used to check the connectivity
with the external provider:

  POST /externalhostproviders/{provider:id}/testconnectivity
  <action/>

The second is used to import the chain of certificates of the external
provider:

  POST /externalhostproviders/{provider:id}/importcertificates
  <action/>

The provider resource includes subcollections for certificates, provisioned
hosts, discovered hosts, host groups and compute resources, all of them read
only. For certificates it will look like this:

  GET /externalhostproviders/{provider:id}/certificates
  <certificates>
    <certificate id="{host:id}">...</certificate>
    ...
  </fcertificates>

  GET /externalhostproviders/{provider:id}/certificates/{certificate:id}
  <certificate id="{certificate:id}">
    <subject>CN=provider.example.com</subject>
    <content>...</content>
  </certificate>

For provisioned hosts:

  GET /externalhostproviders/{provider:id}/hosts
  <external_hosts>
    <external_host id="{host:id}">...</external_host>
    ...
  </external_hosts>

  GET /externalhostproviders/{provider:id}/hosts/{host:id}
  <external_host id="{host:id}">
    <name>myhost</name>
    <address>mhost.example.com</address>
  </external_host>

For discovered hosts:

  GET /externalhostproviders/{provider:id}/discoveredhosts
  <external_discovered_hosts>
    <external_discovered_host id="{host:id}">...</external_discovered_host>
    ...
  </external_discovered_hosts>

  GET /externalhostproviders/{provider:id}/discoveredhosts/{discoveredhost:id}
  <external_discovered_host id="{discoveredhost:id}">
    <name>myhost</name>
    <ip>192.168.122.23</ip>
    <mac>52:54:00:1a:65:40</mac>
    <subnet_name>...</subnet_name>
    <last_report>...</last_report>
  </external_discovered_host>

For host groups:

  GET /externalhostproviders/{provider:id}/hostgroups
  <external_host_groups>
    <external_host_group id="{group:id}">...</external_host_group>
    ...
  </external_host_groups>

  GET /externalhostproviders/{provider:id}/hostgroups/{group:id}
  <external_host_group id="{group:id}">
    <name>mygroup</name>
    <architecture_name>...</architecture_name>
    <operating_system_name>...</operating_system_name>
    <subnet_name>...</subnet_name>
    <domain_name>...</domain_name>
  </external_host_group>

For compute resources:

  GET /externalhostproviders/{provider:id}/computeresources
  <external_compute_resources>
    <external_compute_resource id="{resource:id}">...</external_compute_resource>
    ...
  </external_compute_resources>

  GET /externalhostproviders/{provider:id}/computeresources/{resource:id}
  <external_compute_resource id="{resource:id}">
    <name>myresource</name>
    <provider>...</provider>
    <user>...</user>
    <url>...</url>
  </external_compute_resource>

Change-Id: I2144125f00822263dc68da881eb3180c4cd6b237
Related-To: https://bugzilla.redhat.com/1132259
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>