Fixed PHP-901: Detect server state changes

The get_server_flags() is only executed upon creating the connection...
This unfortunately means that whenever the mongod changes it status -
without closing the currently open sockets - we don't detect that.
This happens for example when we force a mongod into recovery mode.

This fix extract the node type again and compares it to the original
discovery, and bails out if different.

NOTE: This is not needed in master as these functions have been merged
completely

This fixes the mongod-recovery-mode-001.phpt test in v1.4
Merge pull request #524 from bjori/PHP-901-mongod-state-change

Fixed PHP-901: Detect server state changes

* bjori/PHP-901-mongod-state-change:
  Fixed PHP-901: Detect server state changes
Merge branch 'v1.4'

* v1.4:
  Fixed PHP-901: Detect server state changes