MongoDB: Ensure primary gets a vote and there are an odd number of voters
MongoDB: Address review comments

* Removed REPLICA_SET_ENABLED config in favour of isReplicaSetMember()
* Null checks and other miscellaneous fixes