Fixed PHP-1111: MongoClient constructor crashes on connection to slave.

https://jira.mongodb.org/browse/PHP-1111
Not really. For replicasets we use ismaster and figure out the hosts/port combination from the configured set.

Master/Slave doesn't support introspecting which hostnames were used for set-up, so there is not much we can do to get the "correct" information. As there are other bits of the test suite that sort of force localhost, I didn't think this would be a problem here.