Fix #13596; #13722: .replaceWith consistency

Achieving consistency runs a little deeper than anticipated, but overall is not too bad.

```
   raw     gz Sizes                                                             
271232  80759 dist/jquery.js                                                    
 93134  32871 dist/jquery.min.js                                                

   raw     gz Compared to 1.x-master @ 937b2b194d8516d82f2c51c1573ec4316e2960b8 
  +280   +102 dist/jquery.js                                                    
   +33    +30 dist/jquery.min.js
```