Evaluate sequences within the context of the Evaluator when possible

This fixes weird issues where methods invoked within sequences
(like `sprintf`) fail because these methods are being evaluated within
the context of the DefinitionProxy. With this change, invoking `#next`
on a sequence happens from the evaluator so if the scope is provided (it
usually will be), it'll run in the proper context. This means a couple
of oddities are fixed:

1. Developers can now refer to methods on the object instance, just like
in dynamic attributes:

    class User
      def company
        # company lookup
      end
    end

    FactoryGirl.define do
      factory :user do
        sequence(:job_title) {|n| "{title} #{n} at #{company.name}" }
      end
    end

2. Invoke methods typically available because the method is available on
Object (e.g. Kernel methods):

    FactoryGirl.define do
      factory :user do
        sequence(:last_4_ssn) {|n| sprintf '%04d', n }
      end
    end

[#466]
Update mocha version dependency and require mocha/api

[Closes #470]
Fix warnings

[Closes #463]
Convert to expect syntax
Bump gem version requirements for ActiveRecord
Test against activerecord 4.0.0.beta
Bump version to 4.2.0
add license information to gemspec

This way it can be used with rubygems.org API
Bump rails gem versions to latest for Appraisal
Add Code Climate badge
Add global callbacks

This allows callbacks (after :build, :create, etc.) to be defined at the
FactoryGirl level; this means that the callback will be invoked for all
factories. This is primarily to maintain consistency and follow the
principle of least surprise.

As usual, callbacks are applied from the lowest component to the
highest, meaning that global callbacks will be run after factory and
trait callbacks are run.

    FactoryGirl.define do
      after(:build) {|object| puts "Built #{object}" }

      factory :user
      # ...
    end

Closes #481
Closes #486
probable typo - missing interpolation #
change reference from 'next' to 'generate'
Fix sequence name in GETTING_STARTED
Merge pull request #2 from thoughtbot/master

合并