Change subject of host/class/define specs to a lambda

This is so we can capture exceptions from the catalogue compilation
process inside our matchers rather than at the base rspec level.
Add and_raise_error chain to compile matcher

Instead of

  expect { should compile }.to raise_error(Puppet::Error, /whatever/ }

we can now do

  it { should compile.and_raise_error(/whatever/) }
Overzealous search & replace
Merge pull request #151 from rodjek/capture_compile_failures

Capture compile failures
Add slightly modified spec from #152
Don't rescue errors in #cycles_found?

Pass them up to #matches? where they can be handled by the #and_raise_error
logic.
Merge pull request #153 from rodjek/152

Capture compilation errors only found when building the full relationship graph
add catalogue method to function example group

This brings the function example group into line with the
class/define/host example groups.  Having access to the catalog in this
context is particularly useful for testing functions that create
resources. Eg.

    it 'should work make a stooge resource' do
      should run.with_params('larry')

      larry = catalogue.resource('Stooge' 'larry')
      larry[:hates].should eq 'knock knock jokes'
    end
Merge pull request #155 from jhoblitt/function_example_catalog

add catalogue method to function example group