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