Improve Array#delete_if/reject! compatibility

Ensure that RubyArray#rejectBang fully updates the array at each step
of its iteration with a more direct port of MRI's array#ary_reject_bang

This requires more work than the previous implementation, but ensures
that the array is in the expected state if a user checks its contents
during the iteration, or breaks from the iteration early (as described
in https://bugs.ruby-lang.org/issues/2545)
Merge pull request #1883 from dmarcotte/test-delete_if

Improve Array#delete_if/reject! compatibility