Implement type conversions

Based on a patch by Josef Reidinger:

  https://github.com/yast/y2r/pull/3