POST with invalid params should stub :update instead of :save

I noticed a inconsistency in the generated controller scaffold.

The spec for valid params expects a call to `update`, but the spec for invalid params expects a call to `save`. Only 'update' is used with the controller action.

I assume this only worked because the Rails implementation of `update` calls `save` within the implementation at some point?
Merge pull request #1000 from andyw8/patch-1

POST with invalid params should stub :update instead of :save
changelog for #1000
Centralized config API extensions into a method.

This lets us re-use that method when we isolate
config in our specs.
Improve example group mixin testing.

- Use a shared example group instead of a
  matcher. There are many more aspects to test
  than just one matchers worth.
- Rather than stubbing the metadata, actually
  write out spec files in an appropriate directory.
- Add coverage for `spec/api` mapping to `:request` specs.
Fix spec type inference.

- In #970 we added `infer_spec_type_from_file_location!` but forgot
  to remove the code in `lib/rspec/rails/configuration.rb` that
  made it always infer - so the opt-in API was there but it
  was always enabled. Here I've made it truly opt-in.
- The logic of `infer_spec_type_from_file_location!` also setup
  the helper module inclusion via explicit `:type` metadata but
  was only intended to setup the implicit mapping of spec file
  location to type.  Here I've made the module inclusion via
  `:type` always work w/o an explicit config option needed to
  enable it.
- We used to mutate the `:type` metadata on inclusion of the helper
  module, but this caused bugs such as #825. The problem is that
  rspec-core uses a raw hash for the metadata and doesn't re-apply
  filtering/inclusion logic when the metadata hash is mutated.
  Instead, we use a new explicit `define_derived_metadata` API.

Fixes #825 and closes #829.
Stop mutating metadata.

There's no need to anymore, and it created some surprising
bugs (such as #825: `before(:all)` hooks would not properly
be applied because they were registered before the modules
were included).