configure_datastore_add_replicants fixes

Fix some logic and typos in `configure_datastore_add_replicants`:

• Interpret exit code 0 from `mongo` as signifying success rather than error.

• Change `"$(echo foo)"` to `'foo'` or `"foo"` as appropriate in several places.

• Perform string comparison instead of pattern matching when comparing `$replicant` and `$master_out`.

• Fix a typo of `$replicant` as `$repicant` in an error message.

• Reformat some commands and control structures.

Note: This is untested, except by copying and pasting individual commands.