BZ1032192 - AlertCondition composite queries, query each column

Hibernate would return an empty entity and consequently lead to N+1 selects.

The code is ugly, unfortunately.

Adding tests for these queries
BZ1032192 - AlertCondition intentional API changes

Adding intentional API changes as well
[BZ 1069547] Limit the choice of resource groups and destinations
based on the bundle type.
Add missing closetag
[1125439] Duplicate baselines metric entries
Due to some git trouble this is something of a manually generated squash
commit.  The changes are somewhat two-fold.  First, there are changes
relevant to the initially reported symptom, which was the existence of
duplicate baselines for a single schedule.  The code looked like it was
capable of generating a storing a duplicate, due to the use of Lists (not
Sets) in the APIs, and also the lack of a unique index even though there is
a 1:1 relationship between baseline and schedule.  The first set of commits
addressed these issues and also adding chunking to avoid large Txs and also
oracle IN-clause limits.
- Make the db index on baseline's scheduleId unique. There should only be
  one baseline for a schedule. This will prevent the problem in the BZ, possibly
  at the expense of failure when trying to store a duplicate, but that would
  perhaps help us pinpoint a problematic code-path.
- Use Sets (or a Map) as opposed to Lists in several places in the local API.
- Simplify and I think make more efficient the query for selecting schedules
  without a current baseline. Make it return distinct ids (this is a hedge,
  I don't think it would return duplicates, but this ensures that constraint).
  Replace a left join with a NOT EXISTS sub select.
- Chunk the storage of baselines to prevent large Txs, don't pass entities
  across Tx boundary, fetch all Schedules in one query, and (maybe) simplify the
  entity manager interaction.
- Simplify some of the TransactionAttribute decls
- Mark MeasurementSchedule.baseline as an optional 1-1 relationship, just to make
  it explicit on the entity.
- Fix some local SLSB jdoc

Later, the actual root cause was discovered: the baseline job executing
concurrently and the same schedule occurring in the overlapping jobs. This
scenario was originally thought to be impossible  due to the stateful
nature of the quartz job. But in fact it is possible in certain conditions
due to quartz clustered recovery logic(see BZ comments).  These changes
minimize the concurrent job possibility:
- increase the quartz clusterCheckinInterval from 30s to 2m.  This
  decreases the chance of false positives when quartz checks for down
  schedulers and should have little or no effect on the recovery of our jobs.
- move the data calculation work from DataPurgeJob to the new DataCalcJob,
  leaving DataPurgeJob to deal only with RDB maintenance and letting
  the new DataCalcJob only work on baseline and OOB generation.  There is
  no reason for DataCalc work to have to wait for DB maintenance work.
  Also, stagger the jobs by 1/2 hour to lessen concurrent work.
- for the cron jobs, switch the misfire policy from the default (RUN_ONCE)
  to DO_NOTHING.  So, instead of long running jobs again starting up
  immediately after finishing, let it wait for the next scheduled start
  time.  This also reduces the chances of overlap if we do in fact get a
  false positive recovery situation.  (as an aside, there is a good web page
  here regarding clustered quartz logic: http://flylib.com/books/en/2.65.1.91/1/)

Given the work described above it's now very unlikely but not completely
guaranteed that we won't have overlapping baseline calculation jobs.
Because we now have a unique index on baseline.schedule we will immediately
detect an attempt to store a duplicate baseline for a schedule.  In the
unlikely event that this happens we know it's [very likely] due to an
overlapping job. So if we fail to save baselines because of a constraint
violation we just catch, log a warning and continue.
Bug 1129304 - Newly imported resources are not included in dynagroups which
use resourceConfiguration in expression for several hours

Fixed ConfigurationCheckExecutor which was due to typo (incorrectly nested
code inside if/else) not able to load configuration for all resources.
Bug 1113593 - Blank space around value of rhq.server.email.smtp-host
property in rhq-server.properties is not removed and causes
java.net.UnknownHostException when starting RHQ server

Added a check to rhqctl start & install commands that prints warnings in
case it finds lines with trailing spaces in rhq-server.properties file
Downgrade mysql driver to 5.1.31 to temporarly solve maven mirroring issues.
Set top margin to rha content
Bug 1131341 - Hard to select RH Access -> Search menu item since
notification has been shown
JON3-7 doc: do not confuse EAP server group and bundle destination resource group
[BZ 1069547] Fixing the broken change detection when updating bundle types.
[BZ 1128003] Abort installation if there is an error during the rhq.ear installation
[1061311] rhqctl contains user modifiable values that result in an unsupported rhqctl script
Apply a missing fix to to rhqctl that was already in the .bat.
This reverts commit 8668677a01100d22e6799ce3f73f58b92a1b030c and 82fba05c62d5a5036455fa936cfa045f60b4724c

Re-introducing lazy loading is a bad idea.
Bug 1096332 - All content-related workflows broken on Agent

All *ContextImpl classes now user eagerly loaded plugin container services

The content subsystem was the only one affected as:
* some of the other managers were created and initialized before the inventory manager
* some of the *ContextImpl classes were still lazy loading container services
Merge pull request #65 from genman/BZ1032192

BZ1032192 - AlertCondition composite queries, query each column
[BZ 1070257 + BZ 911432] - Increasing the size of db column RHQ_ALERT_CONDITION_LOG and adding an explicit way to match alert condition on event source

messages from squashed commits:
* [BZ 1070257 + BZ 911432] - UI for alert definitions of type Event Detection and the ability to match on a source location regular expression.
* [BZ 1070257 + BZ 911432] - i18n
* [BZ 1070257 + BZ 911432] - There was a change in public constant in core/domain -> adding it as intentional api change
* [BZ 1070257 + BZ 911432] - rhq_alert_condition_log.value: VARCHAR2(512) -> VARCHAR2(4000); fixing the situation when one or both regular expressions are empty (getValueAsString() returns 'null' as a string if the form field is blank - http://forums.smartclient.com/showthread.php?t=21516)
[BZ 1070257 + BZ 911432] - ensuring the value passed to AlertConditionLog.setValue satisfies the db constraint (for Postgres it is AlertConditionLog.MAX_LOG_LENGTH chars and for Oracle AlertConditionLog.MAX_LOG_LENGTH bytes).
[1070257] (JON3-36) Extend length of Details field of alert notifications
One additional commit to the PR.  Just use DatabaseTypeFactory.getDefaultDatabaseType()
instead of figuring it out manually.