Extract logic about `Array#replace` as `Ember.ArrayPolyfills.splice`