Added experimental capturing groups support.

In CorpusQL, capture using a name and a colon, e.g. "the"
MyGroup:([pos="adj"]+) "fox" will capture all the adjectives in a group
called "MyGroup".

It works by instantiating a TextPatternCaptureGroup, which translates
into a SpanQuery/SpansCaptureGroup, which register the group with the
new HitQueryContext that is available to all BLSpans objects during hit
fetching.

The Hits class will automatically fetch captured group information if
there were any capturing groups in your query. Access them using the new
methods, e.g. getCaptureGroups(), getCaptureGroupNames(), etc.

NOTE: this is experimental code and the interface may change.
Changed some names to make more sense.

Before, all methods, etc. were named "..CaptureGroup..", but it makes
more sense to name them "..CapturedGroup.." (with a d) while iterating
through hits, because you're accessing the groups that were already
captured.
Changed Map in Hits.getCapturedGroupMap() to TreeMap.

Done so you can iterate over the map in original group order.
Fixed capture groups becoming unavailable for some queries.

The problem was that some queries use SpansInBuckets to "prefetch" hits
from its underlying Spans object and do something with them (e.g. sort
by endpoint instead of start point). The underlying Spans object would
be advanced past the hits, making the capture group information
unavailable.

To fix this, BLSpans.getCaptureGroups() is now used to "bubble" capture
group information up the BLSpans tree instead of querying it directly
from the BLSpans object we were trying to capture. SpansInBuckets can
therefore just fetch the capture group information as well and pass it
up when the time comes.
Fixed NullPointerException when not capturing groups.
Fixed NullPointerException in SpansNot when using matchall.
Updated CQL parser to allow numbers as group names as well.

This will improve interoperability with the Lexicom Sketch Engine which,
like BlackLab, supports a dialect of CWB's Corpus Query Language.
Optimized group capturing a little bit.

BLSpans now keeps track of whether or not subclauses contain capturing
groups. If not, it will not call the whole subtree in
getCapturedGroups(), improving performance a little. Particularly
important for SpansInBuckets, which would store captured groups for all
hits even if there weren't any in its subclauses.
Fixed bugs related to group capturing.

Changes:
- Added matchesEmptySequence() method to TextPatternCaptureGroup, TPOr,
TPProperty, changed it in TPRepetition.
- Changed how BLSpanOrQuery initializes its spans and returns captured
group information.
- Changed how captured groups register themselves because a single group
can be captured multiple times in a query (because of how optional
elements in sequences dealt with, by splitting it into an OR-query).
- A few minor group-capture-related fixes.
Added TokensPermetaValue utility.
Added a bit of data to search unit tests.
Merge branch 'capture-groups': experimental group capturing support.

With this, you can capture part of a CQL query in a named group, like
you can do with regular expressions. See the individual commits for more
information. It shouldn't have a significant impact on queries that
don't use this feature.

This merge also includes two generally useful bugfixes:
- optional clauses at the end of a sequence are now really optional
(before they weren't)
- fixed how some TextPatterns report whether they match the empty
sequence

Support for using captured groups in backreferences and global
constraints will be added in the future.