Make sure type variants are set correctly

For some types (structs, classes) addTypeModifiers wasn't called
and therefore TYPE_MAIN_VARIANT wasn't set up. So the backend
thought it handled two different types if a variant was
encountered. This prevented inlining in some cases.

Also refactor the toCtype functions so the the main logic
is only executed for the main variant. Other variants
just get the main variant Ctype and use addTypeModifiers
to obtain the final type.
Merge pull request #56 from jpf91/fixInline

Make sure type variants are set correctly