codegen: refactor rsdl/xsd codegen

Change-Id: I6a885eab0cefc58d9e8385d6a863c98bff2fd6a0
Signed-off-by: Michael Pasternak <mpastern@redhat.com>