Refactor CollectionProxy#scope to avoid calling #extend.
Merge pull request #10058 from jamesgolick/master

Avoid calling define_method in CollectionProxy#scope