Fixed some bugs with XML serialization.

Metadata were not being created as iterables, but now they are. Also, Xigt's core now works a little better when in the 'transient' or 'incremental' modes, whereas before it would fail to iterate over anything.
Adding query.py.

query.py is going to be used for requesting information from a Xigt corpus, such as values of tiers, metadata, and so on. Currently it's only used to generate a summary of the counts of objects in a corpus.