decode: fix reversed tuples in numeric decoder.
qrtest: fix filename extension check.
decode: support multiple data segments.

Previously, the payload was assumed to consist of one large data
segment. Now, multiple segments of different types may be concatenated
together. The data type reported is the highest data type encountered
while decoding.