Add tests for tagged and taggedSum
Make cata take an object

Now doesn't rely on undefined behaviour of iterating through fields in
a particular order.