[BZ 1135630] 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.

Conflicts:
	modules/enterprise/server/server-metrics/src/main/java/org/rhq/server/metrics/MetricsDAO.java
	modules/enterprise/server/server-metrics/src/test/java/org/rhq/server/metrics/MetricsDAOTest.java
	modules/enterprise/server/server-metrics/src/test/java/org/rhq/server/metrics/invalid/InvalidMetricsManagerTest.java
[BZ 1135630] 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 1135630] 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 1135630] 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 1135630] fix merege conflicts after rebase
[BZ 1135630] 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.

Conflicts:
	modules/common/cassandra-schema/src/test/java/org/rhq/cassandra/schema/MigrateAggregateMetricsTest.java
[BZ 1135630] and test for replace index in RHQ 4.12

Conflicts:
	modules/common/cassandra-schema/src/test/java/org/rhq/cassandra/schema/TestUpdateFolderFactory.java
[BZ 1135630] 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.

Conflicts:
	modules/common/cassandra-schema/src/main/java/org/rhq/cassandra/schema/Table.java
[BZ 1135630] make number of partitions hard coded for now

We will make it configurable in https://bugzilla.redhat.com/show_bug.cgi?id=1140849.
[BZ 1135630] refactor metrics migration test

There was a big in MigrateAggregateMetricsTest that I introduced in a previous
commit that actually caused the migrtion step to get skipped. I took the
opporuntity to do some refactoring to make it a little easier to write schema
update tests. I have introduced UpdateFolderFactory which is repsonsible for
creating the UpdateFolder objects. UpdateFolderFactory can be subclassed such
that tests have full control over what steps are actually executed. I have also
added some minimal verification to MigrateAggregateMetricsTest.

Conflicts:
	modules/common/cassandra-schema/src/main/java/org/rhq/cassandra/schema/Table.java
	modules/common/cassandra-schema/src/test/java/org/rhq/cassandra/schema/MigrateAggregateMetricsTest.java
	modules/common/cassandra-schema/src/test/java/org/rhq/cassandra/schema/TestUpdateFolderFactory.java
[BZ 1135602] clean up/remove commented out, obsolete code

Conflicts:
	modules/enterprise/server/server-metrics/src/main/java/org/rhq/server/metrics/MetricsBaselineCalculator.java
[BZ 1135602, 1135630] cleaning up merge conflicts

Conflicts:
	modules/enterprise/server/server-metrics/src/test/java/org/rhq/server/metrics/MetricsDAOTest.java
	modules/enterprise/server/server-metrics/src/test/java/org/rhq/server/metrics/invalid/InvalidMetricsManagerTest.java