sdk: Fix find root tag

Currently when the SDK needs to generate the XML document for an entity
it selects the root tag doing a reverse lookup inside the _rootClassMap
dictionary. This isn't correct, because that dictionary contains
duplicates. For example, for the "User" class there are more than one
corresponding tags:

  "user": User,
  "owner": User,
  ...

The root cause of this problem is that the _rootClassMap dictionary
contains entries for all the element definitions contained in the XML
schema, not only for the top level element definitions. The non top
level element definitions shouldn't be used to determine root tags, as
they can't be used as the root tag of valid XML documents.

This _rootClassMap dictionary was introduced to overcome a limitation of
generateDS.py, but that limitation was fixed in version 2.12a. It can't
be removed now because users may be calling the "findRootClass" function
that uses this dictionary.

To address these issues this patch modifies the code generator so that
it won't use the _rootClassMap dictionary, but the dictionary generated
by generateDS.py. In addition the patch also introduces a new
_tag_for_type dictionary to be used instead of the reverse lookup in
_rootClassMap. This new dictionary only contains the types corresponding
to top level elements.

The _rootClassMap dictionary and the related functions are preserved for
backwards compatibility.

Change-Id: I67b22c07ff4b91a7bf9b2ff8883ee51bef8c8f58
Related-To: https://bugzilla.redhat.com/1122589
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
(cherry picked from commit 26e1191239229f4b49337571a95995587a68207e)