[MONDRIAN-1729][SP-632]  "Query required more than 12 iterations" error when query should complete.

This change addresses a case where the ordering in which segments are processed by SegmentBuilder.rollup() could impact the resulting segment.  In some cases,
if a column of the second axis was wildcarded, it could incorrectly result in the axis being set as having incompatible predicates (lostPredicate=true).  Similarly,
the intersecting values could be mishandled, depending on the ordering of segments with wildcarded columns.
Test cases committed with this change check for equivalent rollups with segments processed in forward and reverse order.
(cherry picked from commit 2cdffbe64ee6a9e46ce9f4c084ab547e1786ed54)
Merge pull request #158 from mkambol/mon1729

[MONDRIAN-1729][SP-632]  "Query required more than 12 iterations" error when query should complete.
[MONDRIAN-1729][SP-632]  Rolling back changes from commit 2cdffbe while investigating test failures.
Merge pull request #159 from mkambol/segmentBuilderRollback

[MONDRIAN-1729][SP-632]  Rolling back changes from commit 2cdffbe/b99f734 while investigating test failures.
[MONDRIAN-1729][SP-632] "Query required more than 12 iterations" error when query should complete.

This change addresses a case where the ordering in which segments are processed by SegmentBuilder.rollup() could impact the resulting segment.  In some cases,
if a column of the second axis was wildcarded, it could incorrectly result in the axis being set as having incompatible predicates (lostPredicate=true).  Similarly,
the intersecting values could be mishandled, depending on the ordering of segments with wildcarded columns.
Test cases committed with this change check for equivalent rollups with segments processed in forward and reverse order.
(cherry picked from commit 2cdffbe, 2b5bf5aa, e507584)
Merge pull request #164 from mkambol/3.5SegRollup

[MONDRIAN-1729][SP-632] "Query required more than 12 iterations" error when query should complete.
[MONDRIAN-1726]  Possible deadlock when number of batches exceeds available connections in the pool

Deadlock could occur if a cardinality query occurred on the actor thread when all db connections were consumed.  See the details of MONDRIAN-1726 for details about
the exact scenario.

This change forces cardinality values to be loaded before issuing a LoadBatchCommand, avoiding the risk of a query happening on the thread.  The down side of this approach
 is that cardinality checks are performed even in some cases where they wouldn't be necessary.  MONDRIAN-1801 is intended to come up with a better solution for Mondrian 4.
(cherry picked from commit f1c26c4)
[MONDRIAN-1726]  Eliminated RolapUtil.Semaphore in favor of java.util.concurrent.Semaphore.  Our home-rolled version had bugs that show up when testing with low QueryLimit values.
(cherry picked from commit 502daee)
Merge pull request #186 from mkambol/35mon1726

[MONDRIAN-1726] cherry pick