add json -> pig conversion for Complex types

refactor pig tests
fixes #36