PHP-942: Throw MongoDuplicateKeyException on duplicate key errors
11001 and 12582 are also valid duplicatekey error codes
Add the error code into the test, per pr review
Merge pull request #559 from bjori/PHP-942-duplicate-key-exception

PHP-942: Throw MongoDuplicateKeyException on duplicate key errors

* bjori/PHP-942-duplicate-key-exception:
  Add the error code into the test, per pr review
  11001 and 12582 are also valid duplicatekey error codes
  PHP-942: Throw MongoDuplicateKeyException on duplicate key errors
PHP-941: Throw MongoConnectionException on stream failures

We need to be careful to restore it after each stream call, and most
importantly before mongo_manager_log(), otherwise those log entries
could throw exception
Add test for converting a stream warning into exception
Fix build with PHP 5.2 from 2006
Skip test on 5.2, tottally different looking exception
Update to use macros for PHP 5.2 compatability