[BZ 1069547] Support for API-based bundle handlers

This is to support new type of dedicated bundle handlers able to do more
than just file-system modifications. In order to enable them to e.g.
connect to some remote endpoint, a more complex configuration data needs
to be passed over.

This creates coupling between the bundle destination definition and the
handler that is able to deploy to such destinations (because it needs to be
able to use the configuration offered by the destination definition) but
that is unavoidable given the specific things the handlers would be doing.

* The resource types can use the new "destination-definition" tag under
bundle target to define new type of destinations that can use
a "connection string" expression + can pass all or parts of resource or
plugin configs or traits to the bundle handler.

* The agent-side bundle handlers have access to the bundle deployment
configuration even in the purge scenario. This is to support the more
complex bundle handlers needing the config to better identify the bundle
deployment.

* The deploy directory is no longer a required argument when creating a
bundle destination. This is because for the API based bundle handlers,
such configuration property might not make any sense and would only create
confusion on the user side.

* It is no longer required for the server bundle plugins to come up with
the full list of the required files upon reading the recipe alone.
The bundle plugins can therefore choose whether they support piece-wise
upload of the bundle version or only support uploading a full bundle
distribution file.
[BZ 1069547] Wildfly patching by various means

* Bundles - using a dedicated bundle type. This enables us to understand
the patch zip file as our bundle without any RHQ specific recipe.
We can supply various parameters to patch application process but although
revert is supported, it cannot be configured by any parameters as one can
do over Wfly's CLI.

* Content - patches appear as packages of the AS7 standalone server.
They are discoverable and can be installed from repositories (without any
possibility of customizing the install process). Delete (i.e. rollback)
is supported, again without configuration.

* Rollback through operation - in case user would need special behavior
on rollback, they can use a dedicated operation on the AS7 standalone
server resource.

* Bundle handover - patches can be installed using the bundle handover
facility, too, using the "patch" action. This is configurable using
handover parameters and supports all the parameters available in Wfly's
CLI.
[BZ 1069547] Fixes

* typo in CliExecutor.executeCliCommand preventing execution in
connected mode

* apply patches in disconnected mode when deploying through content
subsystem
[BZ1119652]  Webappp configuration - Config File field is mandatory.
[BZ 1069547] Removing support for patches from the content subsystem

This is to not overload the user with overlapping yet incompatible
choices for doing the same thing.

After discussion, we decided to keep the support for patching in the
bundle subsystem and drop it from the content subsystem.

This also means we need to drop the specialized rollback operation
because using that we could bring RHQ bundles into an inconsistent
state.
Merge 'origin/master' into bug/1069547
[BZ 1069547] Removing support code for rollback operation.

The operation has been removed from the descriptor in the previous commits
but I failed to also remove the backing code for its execution.
[BZ 1069547] Fixing the wrong schemaSpec number.

This comes from a wrongly resolved conflict in the db-upgrade.xml.
Bug 1122514 - Query Resource only available in postgres Plugin

Added to the MySQL and Oracle plugins

Tested on Oracle XE and MariaDB
Bug 1115146 - Purge (delete) data using smaller batches

Fixed a mistake on Log type
[1119781] runtime name provided for deployment child creation overrides application name and path
Use the deploymentName as appropriate, the runtimeName should be an attribute
on the deployment and can be the same on multiple deployments, the
deploymentName must be unique among deployments.

-- incidental: several logging auto-formatting changes.
Bug 1115725 - Operation history continues to grow unbound with no easy way to purge old history

Fix an issue on Oracle, no ID conversion needed, Hibernate does it

Also, some code cleanup
Bug 1050014 - Cannot deploy bundle to EAP domain mode

Deployment node must be created with the filename, not the runtime name

See also Bug 1119781 - runtime name provided for deployment child creation overrides application name and path
itests-2: fix org.rhq.enterprise.server.alert.GroupAlertDefinitionManagerBeanTest.testBug738799

Criteria filters on Oracle cannot be filled with more than 1000 elements
Bug 1122047 - If 'Accept' header field is not explicitly specified, server
responds with empty body upon REST query metric/data/{scheduleId}/raw

in case accept header does not specify media type, we fallback to JSON.
Merge pull request #93 from jfclere/master

[BZ1119652]  Webappp configuration - Config File field is mandatory.
[1118394] deployment of new war from repo content fails
This is not a fix for the reported issue, which actually seems to not be a
bug.  This is a fix to ensure failed package installs persist the error
messageto the history record in the DB. And to provide a more useful
log message in the agent log.
[801432, 807465] Related Issue to these BZs
Uninventory triggered our "assert-style" debug logging indicating that we
were working with HashSet for child resources when we expected to be using
a safer Set impl (wrt preventing ConcurrentModoficationException). There
were a few issues in play:
- When loading persisted resources from disk convert childResources to
  CopyOnWriteArraySet if necessary.  This repairs resources persisted with
  the wrong Set impl.
- Eliminate some potential concurrent modification danger (or, at a minimum,
- Fix a couple of other places where we weren't using CopyOnWriteArraySet
- Fix Resource entity to ensure that when customChildResourcesCollection=true
  that the childResources Set is truly protected. It was here that we were
  losing the proper Set impl.
  some unnecessary work) by only calling deactivateResource() on the root
  resource. It recursively deactivates the subtree, so no need to then call
  it on every node in the subtree.
- Fix our "assert-logging" conditional, which despite finding this issue was
  actually looking for the wrong set impl. It had not been updated when we
  moved to CopyOnWriteArraySet.
StorageNodeComponentItest - output more details when assertion fails
Fix AlertConditionTest timing issues for rhq-master-ora build

Introduced org.rhq.test.AssertUtils.timedAssertion

Also, some code cleanup