Fix #14313: Optimize jQuery.merge for size. Close gh-1344.
Ref #14313: Further code and test improvements