Merge pull request #136 from garysweaver/master

Adding documentation for :serializer and :polymorphic options on associations
Revert "clean up lazy loading of serialization support for
ActiveRecord::Base and ActionController::Base"

The whole idea of having a lazy hook is that it can be executed
in the context of different targets. The moment you hardcode the class,
the hooks can no longer run in the proper context.

This reverts commit 506e2ac9ad355b78f6bc94823f2aa3f1aa73ef35.
Extract Associations module into separate file
In the test, use the same :hash across serializers

Otherwise, `include!` will not remember the unique_values of
already-sideloaded hashes across serializer calls.
When objects are sideloaded multiple times, serialize them only once

To achieve this, we make the following change when sideloading: Instead
of serializing associations and discarding duplicate *hashes*, we
memorize the *objects* (records) that we have already serialized, and
only serialize those that are new.

This change is mostly transparent, and brings down serialization time
from 3.1 seconds to 1.0 seconds on my set of sample data.

There is one change in the behavior: If you sideload the same object
multiple times, and it yields different hashes, like so:

    embed :ids, include: true
    has_many :comments
    has_many :recent_comments, root: comments, serializer: CommentShortSerializer

then previously, it would be included multiple times, whereas now, the
first hash wins. (I haven't actually tested this.) I don't know that
either option is preferable. It's not covered by the test suite, and I
think it's an edge case that is OK to ignore entirely.
Remove newly-redundant OrderedSet
Merge pull request #142 from joliss/sideloading-complexity

When objects are sideloaded multiple times, serialize them only once
Make schema not crash on computed attributes

We do not know the type for computed attributes, so we pick nil.

Perhaps at some point we might add a :type option for attributes (or
not), but in any case it's important to not crash when there are
computed attributes.
Make schema not crash on computed associations

We pick nil here as well.
Fixes repo URL in the README's installation instructions

When the gem moved over to github.com/rails_api/, the README instructions
were still pointing to github.com/josevalim/.
Merge pull request #150 from kurko/fixes_new_repo_readme

Fixes repo URL in the README's installation instructions
Add alias_method ActiveModel::Serializer.root= to be consistency with ActiveModel::ArraySerializer
Merge pull request #152 from samnang/setting_root

Fixed root(false) vs root=false inconsistency
move test fakes to separate file
move ArraySerializer tests into separate file
Merge pull request #155 from teeparham/array_serializer_test

Move ArraySerializer tests and test fakes into separate files
Update travis.yml to use the right Rubinius versions
Merge pull request #156 from frodsan/fix_rbx_travis_tag

Update travis.yml to use the right Rubinius versions
update travis link [ci skip]
Merge pull request #157 from frodsan/fix_readme

update travis link [ci skip]