[1073691] Table deadlock issue when processing content report due to missing index and very large transactions in ContentServerServiceImpl.mergeDiscoveredPackages
This is yet another legacy code spot subject to scalability and locking
issues. I've made a pass at making it more scalable and less likely to lock:
- No longer process an entire report under an umbrella Tx. Break up the
  work into more, smaller, Txs
- Reduce # of DB round trips
- Remove several calls to unindexed queries
  - Note, no new indexes have been added at this point. We are still likely
    doing one full-table scan of rhq_installed_package when getting the
    InstalledPackages for a Resource.  We may want to add an index on that FK.
  - Altered queries to use indexes
  - Removed unused queries from InstalledPackage and PackageVersion
- Added some inline doco to help future genrations
- Removed duplicated remote method decls from ContentManagerLocal
- Fixed an issue in ContentManagerBeanTest and re-enabled a bunch of tests

(cherry picked from commit 9aa0c46edb8a74d7e02557b153b60ae1757e6a32)
Signed-off-by: Thomas Segismont <tsegismo@redhat.com>

Conflicts:
	modules/core/domain/intentional-api-changes-since-4.12.0.xml