Add a new function: sub_filter()

sub_filter() resolves the following situation:

Schema:

  table_create Files TABLE_PAT_KEY ShortText
  column_create Files revision COLUMN_SCALAR UInt32

  table_create Packages TABLE_PAT_KEY ShortText
  column_create Packages files COLUMN_VECTOR Files

  column_create Files packages_files_index COLUMN_INDEX Packages files

  table_create Revisions TABLE_PAT_KEY UInt32
  column_create Revisions files_revision COLUMN_INDEX Files revision

Data:

  load --table Files
  [
  {"_key": "include/groonga.h", "revision": 100},
  {"_key": "src/groonga.c",     "revision": 29},
  {"_key": "lib/groonga.rb",    "revision": 12},
  {"_key": "README.textile",    "revision": 24},
  {"_key": "ha_mroonga.cc",     "revision": 40},
  {"_key": "ha_mroonga.hpp",    "revision": 6}
  ]

  load --table Packages
  [
  {"_key": "groonga", "files": ["include/groonga.h", "src/groonga.c"]},
  {"_key": "rroonga", "files": ["lib/groonga.rb", "README.textile"]},
  {"_key": "mroonga", "files": ["ha_mroonga.cc", "ha_mroonga.hpp"]}
  ]

We want to search packages that have any files where 10 <= revision < 40.

We can't use the following query for this puropose:

  select Packages \
    --filter 'files.revision >= 10 && files.revision < 40' \
    --output_columns '_key, files, files.revision'

It matches all packages because the query means that all of the
following conditions should be true:

  * revision >= 10 for each file in files
  * revision < 40 for each file in files

Let's consider about mroonga package. "revision >= 10" is matched
against "ha_mroonga.cc" (revision: 40). "revision < 40" is matched
against "ha_mroonga.hpp" (revision: 6). So mroonga package is
matched.

It is not what we want.

We want packages that matches the following condition:

  * There is any file that matches both revision >= 10 and revision < 40.

Let's consider about mroonga package. "ha_mroonga.cc" (revision: 40)
doesn't match "revision >= 10 && revision <
40". "ha_mroonga.hpp" (revision: 6) doesn't match "revision >= 10 &&
revision < 40". So mroonga packages isn't matched.

It is what we want.

The following query is for the search condition:

  select Packages \
    --filter 'sub_filter(files, "revision >= 10 && revision < 40")' \
    --output_columns '_key, files, files.revision'

It requires sub_filter().