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.