[PHP-647] Detect secondaries from isMaster

See: https://jira.mongodb.org/browse/PHP-647

@bjori: I still need to run the replica set test suite and test this against mongos, but please take a look when you get a chance.

I opted not to update `mongo_connection_type()` in `read_preference.c`, figuring it was fine to report "INVALID" connection types as "UNKNOWN?".