Rework support for more go types.

The old algorithm iterated on the destination datastructures. This
meant that tricky look ahead was required to handle all cases. By
iterating on the source datastructure instead we can vastly simplify
the logic for converting a source type into a destination type.

This commit changes the type mismatch errors to indicate the actual
problem with the types.

Additional test cases now catch the problems seen by
coreos/go-systemd.

Fixes #80
2 files changed