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.
I tried to use the `@foreign_type` instance but it breaks the current features.

The `@foreign_type` is evaluated by `options[:foreign_type] || "#{name}_type"`

Imagine if we:

```
  has_many :taggings, as: :taggable 
```

If we use the ` @foreign_type` instance, it will generate the `taggings_type` column, but the correct is `taggable_type`