Support serializer and each_serializer in render json
Allow for the implicit use of ArraySerializer when :each_serializer is specified.
Fix infinite recursion

The method for testing whether to include an association was causing
an infinite loop when two models referenced each other.
Merge pull request #1 from metermd/master

Allow for the implicit use of ArraySerializer when :each_serializer is specified
Merge pull request #722 from ggordon/stack_level_too_deep

Fix infinite recursion
Bugfix: include nested has_many association

Currently, doing `include: author.bio` would work correctly, but not for
has_many associations such as `include: author.roles`. This fixes it.

The problem was basically that we were not handling arrays for has_many linked,
as happens for ArraySerializers.
Merge pull request #726 from rails-api/json-api-include-with-nested-has-many

Bugfix: include nested has_many associations
Includes links inside of linked resources

According to
http://jsonapi.org/format/#document-structure-resource-objects,

> Resource objects have the same internal structure, regardless of
> whether they represent primary or linked resources.

And then
http://jsonapi.org/format/#document-structure-resource-object-attributes,

> There are four reserved keys in resource objects:
>
> "id"
> "type"
> "href"
> "links"

This commits includes `links` inside of linked resources.
Merge pull request #727 from rails-api/include-links-in-linked-resources

Includes links inside of linked resources
Use type as key for linked resources

If type is `author` but the association is called `writer`, the linked
resource key should be called `authors`, e.g

    {
      ...
      linked: {
        authors: [{
          ...
        }]
      }
      ...
    }
Merge pull request #703 from ggordon/specify_serializer_from_controller

Support serializer and each_serializer options in renderer
Use the new beta build env on Travis

also remove the custom bundle install line as Travis does that by default
Merge pull request #729 from joshk/patch-2

Use the new beta build env on Travis
Fixes rbx gems bundling on TravisCI

Fixes https://github.com/travis-ci/travis-ci/issues/2821
Merge pull request #728 from rails-api/linked-resources-use-type-as-key

Use type as key for linked resources
Rename attribute with :key (0.8.x compatibility)
Merge pull request #720 from ggordon/attribute_with_key

Rename attribute with :key (0.8.x compatibility)
Explicitly set serializer for associations

Document specifying serializer for assocaition