codegen: Calculate singulars correctly

There are a few places in the code generator where the singular form of
words is calculated directly removing the last character, assuming it
will be an "s". This isn't correct, as there are exceptions. The correct
way is to call the StringUtils.toSingular() method.

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