restapi: Recursively scan models when adding links

One of the steps to generate the output document from a model is to add
links to the referenced resources. We do this using reflection to
enumerate the properties of the model, checking which are resources and
adding "href" attributes computed from the identifiers. This works fine
but there are some situations where the referencs to the resources are
not direct children of the model, but grandchildren or potentially
deeper. For example, the work to add template versions will include a
model whose representation will that looks like this:

  <template id="...">
    ...
    <version>
      <base_resource id="..." href=".."/>
      <version_number>3</version_number>
      <version_name>three</version_number>
    </version>
  </template>

In this case the "base_resource" element is a reference to a resource
that isn't a direct child of the template resource, so the method we use
to create the links doesn't add the "href" attribute. This patch changes
the LinkHelper class so that it will recursively scan the model and add
the links in all the levels.

Change-Id: Ibff32c7a2ec65ac2f95bb1dd64361b3c98ef049b
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>