(PUP-2302) Fix issue with Resource Defaults for qualified names

When defaults were set using future evaluator and the resource has
a qualified name, the registration of the default was not recognized
because scope requires every segment of a qualified name to be upper
cased.

This adds upper casing of every segment. An integration test checks
that the capitalization works.
(maint) Convert to compile_to_catalog

The tests used various ways to contruct the catalog. However, putting
together a catalog isn't always as simple as just calling compile.
compile_to_catalog puts all of the steps together in a way that is easy
to use in the tests.
(maint) Convert to using have_resource matcher

Using the have_resource matcher makes the tests a little shorter and
more expressive. It also uses the common way of matching so that we can
get better error reporting.

It turns out that one of the tests was matching against the incorrect
class name, so that is now fixed.

This also extracts a be_resource matcher so that you can match against
an individual resource independent of a catalog.
Merge branch 'hlindberg-pup-2302_defaults-not-capitalized'

* hlindberg-pup-2302_defaults-not-capitalized:
  (maint) Convert to using have_resource matcher
  (maint) Convert to compile_to_catalog
  (PUP-2302) Fix issue with Resource Defaults for qualified names
(maint) Fix creation of Loaders

This line of code missed the update to how Loaders are created because
it was done on a different branch.
Merge branch 'master' of https://github.com/puppetlabs/puppet