Expand handling of constraints against id sets, in order to best take advantage of mysql 5.6 performance improvements while also support efficient queries in earlier versions.
Add additional checking to ensure that no more than one id set is added as a constraint, as this leads to the best performance on mysql 5.5. Also, consolidate logic for checking against multiple id sets in an evaluation context.
Fixing dependency issue by re-including xml-apis as provided from openmrs, and excluding dom4j from poi-ooxml