implement VARIANT_QUERY_UNSHARED_SUBSET (not yet used), other cleanup