Update cardinality estimation for Apply

When producing execution plans, a solution for recursive query building
is to stitch together by using Apply. A SingleRow doesn't actually produce
a single row when inside Apply. It is named SingleRow because that is
how many rows this operator will yield per open()/close() session, but the
total number of rows might be a value much higher. This commit changes
so the cardinality model returns the total number of rows, not just 1.
Early termination of hash joins when possible

If the LHS of the HashJoin is empty or the probe table that is built (in order to execute the hash join)
is empty, we terminate immediately; i.e. no further processing occurs
Merge pull request #3443 from petraselmer/hash-join-abort

Early termination of hash joins when possible
Merge pull request #3438 from systay/cardinality-work

Update cardinality estimation for Apply
Hopefully solves recent build failures with licensing

Conflicts:
	pom.xml
Merge branch '2.1-maint'

Conflicts:
	pom.xml
Fixing build configuration re; licencing
Merge branch '2.1-maint'
Fix flaky index sampling test.
Revert "Fix flaky index sampling test."

This reverts commit af2bed3bd20f447e503425da40034cae45443977.
Actual fix for flaky index sampling test.
Fixes an issue in StringIdMapper where size instead if high index should be used
Import tool docs and packaging.

* Add docs.
* Include it to be deployed with mvn artifacts.
* Include it in download packages.
* Fix script to look for the correct class.
* Upgrade doctools to get bugfix for code listings in manpages.