add convenience methods for checking migrations

if a rails project needs to be migrated ActiveRecord::Migrator.needs_migration? will be true or false if the current version matches the last version. 
change AMS::JSON.include_root_in_json default value to false

Changes:

* Update `include_root_in_json` default value to false for default value
  to false for `ActiveModel::Serializers::JSON`.
* Remove unnecessary change to include_root_in_json option in
  wrap_parameters template.
* Update `as_json` documentation.
* Fix JSONSerialization tests.

Problem:

It's confusing that AM serializers behave differently from AR,
even when AR objects include AM serializers module.

    class User < ActiveRecord::Base; end

    class Person
      include ActiveModel::Model
      include ActiveModel::AttributeMethods
      include ActiveModel::Serializers::JSON

      attr_accessor :name, :age

      def attributes
        instance_values
      end
    end

    user.as_json
    => {"id"=>1, "name"=>"Konata Izumi", "age"=>16, "awesome"=>true}
    # root is not included

    person.as_json
    => {"person"=>{"name"=>"Francesco", "age"=>22}}
    # root is included

    ActiveRecord::Base.include_root_in_json
    => false

    Person.include_root_in_json
    => true

    # different default values for include_root_in_json

Proposal:

Change the default value of AM serializers to false, update
the misleading documentation and remove unnecessary change
to false of include_root_in_json option with AR objects.

    class User < ActiveRecord::Base; end

    class Person
      include ActiveModel::Model
      include ActiveModel::AttributeMethods
      include ActiveModel::Serializers::JSON

      attr_accessor :name, :age

      def attributes
        instance_values
      end
    end

    user.as_json
    => {"id"=>1, "name"=>"Konata Izumi", "age"=>16, "awesome"=>true}
    # root is not included

    person.as_json
    => {"name"=>"Francesco", "age"=>22}
    # root is not included

    ActiveRecord::Base.include_root_in_json
    => false

    Person.include_root_in_json
    => false

    # same behaviour, more consistent

Fixes #6578.
Compact array of values added to PermissionSet instance
Skip two tests with polymorphic if current adapter is Oracle Adapter.
because Oracle Adapter does not support foreign keys if :polymorphic => true is used.
Merge pull request #6597 from frodsan/am_include_root_to_false

change AMS::JSON.include_root_in_json default value to false
Merge pull request #6667 from yahonda/skip_polymorphic_index_with_oracle

Skip two tests with polymorphic if current adapter is Oracle Adapter.
Removed protected as we already doing it above.
We should not include engine.rake file into rake

if we are passing -T which is skip_test_unit

See issue #6673 for more details.

I saw that we are not creating dummy app even if
we do skip_test_unit.

Fixes #6673
Don't add sqlite3 to gemspec with -O on rails plugin new

(closes #6672)
Merge pull request #6681 from arunagw/plugin_gen_fix

Plugin gen fix
Merge pull request #6668 from pomnikita/master

Compact array of values added to PermissionSet instance
Fix tests, active_authorizer shouldn't include blank values

Fix for a test failing after: 00ff0a6776
Merge pull request #6687 from tiegz/3-2-optimizations

ActiveRecord#attributes optimization: minimize objects created
Use each_with_object instead of each here
Remove conditional committed by accident
raise error for pending migration 

can be configured by setting config.active_record.migration. Setting to :page_load will raise an error on each page refresh if there are migrations that are pending. Setting to :page_load is defaulted in development for new applications. 
test errors for pending migrations

App should raise error on page_load
add prompt to 404 & 500 pages to check logs

When new programmers push their code to a production server and receive an error they often don't know to check the logs, this simple reminder will help. Most professional applications have custom error pages so this change shouldn't affect them. The wording of the message should not confuse non-developer visitors.
Fix fragile #assert_queries implementation and usages.

Several tests that passed when run in the order they are loaded
by rake test were failing when run in different sequences due to
problems with the implementation of assert_queries and
assert_no_queries as well as incorrect assumptions made about
how many queries might be executed by a database adapter in
various cases.
removes the obsolete require_association method from dependencies

This is an obsolete method from the very early days,
apparently it was used circa 2004 because STI support
was not smart enough. This method is not public
interface, and we are heading a major version, so
removal seems right.