Merge branch 'master' of github.com:candlepin/candlepin
findbugs: Invocation of toString on an array

The code invokes toString on an array, which will generate a fairly useless
result such as [C@16f0472. Consider using Arrays.toString to convert the array
into a readable String that gives the contents of the array.
findbugs: Method invokes inefficient Boolean ctor; use Boolean.valueOf()

Creating new instances of java.lang.Boolean wastes memory, since Boolean objects
are immutable and there are only two useful values of this type.  Use the
Boolean.valueOf() method (or Java 1.5 autoboxing) to create Boolean objects
instead.

NOTE: Instead of using valueOf(). I just rewrote the condition.
findbugs: Dead store to local variable

This instruction assigns a value to a local variable, but the value is not read
or used in any subsequent instruction. Often, this indicates an error, because
the value computed is never used.
Performance improvements when selecting best pools

- get product attributes from pool, instead of looking up the product.
- created custom guice scope CandlepinSingletonScope to allow single
  per request/job injection.
- inject Product cache using CandlepinSingletonScope to help with product
  lookups.
- Renamed ReadOnlyProductCache as it now returns Product
remove unnecessary assignment to null
Merge branch 'master' of github.com:candlepin/candlepin
Improved query for retreiving service levels for owner.

Used HQL query instead of Criteria to avoid loading object graph.
Merge pull request #52 from candlepin/findbugs

Findbugs
Merge branch 'master' of github.com:candlepin/candlepin
Added distinct to service level for owner query

This should bring the result set size down quite
a bit.
Merge pull request #53 from candlepin/mstead/sla-for-owners-perf

Improved query for retreiving service levels for owner.
Merge branch 'master' of github.com:candlepin/candlepin
Removed unnecessary product lookup for RO Pool provided products.

Provided products will not have the attributes that are checked
in the rules, so we set them to empty.

Removed the test case as it was not correct. Provided products
will not have the attributes set.
Adding comments to classes.
Removed unnecessary comments
fix apidiff/schemadiff script to checkout proper versions

git checkout -f "@{one day ago}" works against the
reflog, which on a fresh checkout, is essentially empty,
so apidiff was falling back to diff the same version.
Result being this script always failed on fresh checkouts
but would work on long lived checkouts.
Merge pull request #51 from candlepin/mstead/custom-scope-pool-attr

Performance improvements when selecting best pools
Throw exception when generating V1 certificates with too much content.

Limit is somewhere around 200 content sets, so we're going with 185 to
be a little more safe. If an entitlement would contain more than this
number of content sets (after environment filtering) we throw an
exception and abort the entitlement.
Filter pools with too many content sets from V1 autobinds.

Had hoped to do this in rules but the information is not available, and
exposing it would introduce an API change which would break on all past
candlepin releases when it recieved the new rules in a manifest or the
like. (unless we introduce some form of rules/JS API versioning)

Because the actual exception we throw when a system tries to use such a
pool is already in core java code, I decided to do this in java as well.

The pools with too much content for V1 consumers will still appear in
the list of available pools, they just won't ever be used in an
autobind/dry-run scenario. This is a PM request that the customer we
prompted to upgrade their client if they try to use such a pool.