Add foreign_type option for polymorphic has_one and has_many association.

To be possible to use a custom column name to save/read the polymorphic
associated class in a has_many or has_one polymorphic association, now users
can use the option :foreign_type to inform in what column the associated class
name will be saved.

The issue [2822](https://github.com/rails/rails/issues/2822) is associated to this change.

I created a self contained [gist](https://gist.github.com/ulissesalmeida/80c54b03b96d9201928f) that shows what I tried to do.
hmmm, what is the difference between `@type` and `@foreign_type`? For what I'm seeing we only have type if we have a `:as` option, but the correct value is already at the `@foreign_type`. I guess we can change where we read this value instead where we write.