Move the node type discovery into the first ismaster call (get_server_flags)
Fixed PHP-392 and PHP-844

This is a regression introduced in 1.3.x.
Arbiters do not contain any data and we should not be trying to login to
them.
Merged Pull Request #507

* pull-request/507:
  Fixed PHP-392 and PHP-844
  Move the node type discovery into the first ismaster call (get_server_flags)