Handle union types when parsing xsd.
Refactored query-building parts of NCSfacetedSearch.