Corrected rspec 2.14 deprecation warnings.

RSpec 2.14 deprecated a lot of things, in preparation for rspec 3. When I run the test suite with rspec 2.14 I get a huge number of deprecation warnings (more than one per file), which makes the results very difficult to read. I've corrected the specs where they were using outdated methods. The highlights were:

* stub!() => stub()
* mock() => double()
* should_receive().any_number_of_times => should_receive().at_least(:once) or stub
Merge pull request #46 from iainbeeston/rspec_deprecation_warnings

Corrected rspec 2.14 deprecation warnings.