Correctly unpack unions

Unions are now unpacked by using a separate unpacker object for each member of
the union, instead of using the same object and incrementing the offset past
the end of the message.

Thanks to @flacjacket for finding this bug.