query.c: Perform UNION and SUBTRACT in-place

I was too dizzy when I first implemented these to remember how you filter an
array in O(N) time.  It basically goes like this:

  output = input_array;

  for (input : input_array)
    if (keep (input))
      *output++ = *input;

  input_array.length = output - input_array;

... as opposed to the naive O(N²) approach:

  for (input : input_array)
    if (!keep (input))
      input_array.erase (&input);

I expect that offset/score arrays will be compressed, so I don't anticipate a
no-clobber version is needed.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Merge branch 'master' of https://github.com/mortehu/cantera-table