Bug 1115146 - Purge (delete) data using smaller batches

1. full scan (only once) the table or index, and put the keys of the rows to delete in a temporary file
2. delete the rows by primary key in batches
[BZ 1069547] Support shutdown of domain controller in ServerControl

This fixes the patching domain controllers which failed if restart
was demanded during the deployment.

Also optimized the reading of host.xml (to find the host of the domain
controller in the domain) to use SAX parser instead of DOM. This is
much lighter on resources and should also be much quicker because we
only need to read first couple of lines of the file.
[1001383] getResourceConfiguration does not return the current resource configuration
Improve some ConfigurationManagerRemote javadoc, making it more clear that
getLatestResourceConfigurationUpdate() satisifies the API request in the BZ (I think).
BZ 1124619 - provide more responsiveness when you want to ask an agent to update itself from the GUI. There is now a "update agent" operation, rather than requiring the user to use "update --update".
[1001383] getResourceConfiguration does not return the current resource configuration
Further improve the confusing/incomplete javadoc surrounding the get/find
configuration remote API methods.
BZ 1088032 - show a warning message if readlink doesn't exist.
[BZ 1070299] Added auto-start description from the EAP 6 documentation. The functionality for auto-strart field was already correct, just adding field description to avoid confusion.
[BZ 1135629,1135603] add metrics_idx table and remove cache tables

This is a big commit that involves a lot of clean up due to the removal of the
metrics_cache and metrics_cache_index tables. This commit also includes a lot
of work updating the aggregation code to use the new metrics_idx table. All of
the tests in AggregationTests.java pass with this commit as well.
[BZ 1135629,1135603] remove CacheAggregator and more clean up

BaseAggregator has been renamed to DataAggregator. The remaining functionality
that is needed has been moved up into DataAggregator. PastDataAggregator still
inherits from it.
[BZ 1135629] add paging for index queries

This is the initial commit for IndexIterator. It encapsulates the logic for
paging with index queries. It also takes care of going through all partitions
in the index for a given date range.
[BZ 1135629] first step in using a configurable number of index partitions

This commit has a lot of changes to support multiple partitions per time slice
in metrics_idx. Prior to this commit, the parttion column was being hard coded.
The next step is to make it configurable through the rhq server measurement
subsystem resource configuration.
[BZ 1135629] fix merege conflicts after rebase
[BZ 1135629] add support for upgrading from RHQ 4.11 index

This commit adds a schema upgrade step for migrating from the metrics_index
table which was used up through RHQ 4.11. I have added some automated tests
with ReplaceIndexTest.java. Support for upgrading from RHQ 4.12 which
introduced the metrics_cache_index table will come in a subsequent commit.

I also added a skip attribute to the <step> element in the schema update files.
If a user is migrating from 4.9, 4.10, or 4.11, it wouldn't make a whole lot of
sense to migrate data from metrics_index to metrics_cache_index and then to
the new metrics_idx table. This functionality allows going directly from
metrics_index to metrics_idx.
[BZ 1135629] and test for replace index in RHQ 4.12
[BZ 1135629] do not load the full index into memory during data aggregation

This commit also includes some clean up, removing more unused classes and
adding some javadocs.