codegen: Fix naming conflict

Currently the code generator generates conflicting classes when the
calculated name of a entity is the same of a collection. For example,
for the following collection:

  /hosts/{host:id}/storage

Note that the name of the collection doesn't end in "s". As a result the
code generator produces a HostStorage class for the collection and a
HostStorage (same name) class for the entity. Due to the order they are
generated the collection class overwrites the entity class.

To avoid this issue this patch changes the code generator so that it
will automaticall add the "s" to the collection class name when there is
a conflict like this.

Change-Id: Ia408b8e16234595b4454c2d252f5fec16414ca49
Bug-Url: https://bugzilla.redhat.com/1120502
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>