improve replset_remove_node.js

(cherry picked from commit 38ba557b50281fa8e1680cbaf7681f06942f4130)
Merge remote-tracking branch 'upstream/v2.4' into v2.4