Implement #take and #take! on associations such as has_many.  Fixes #16934.